浏览代码

Merged revisions 10633,10639-10641,10645-10646,10649,10658,10660-10662,10664-10667,10673-10675,10678-10680,10684-10687,10689,10695,10698-10701,10703,10709,10713-10716,10718-10719,10723,10735-10739,10749,10751,10755-10757,10759-10761,10769,10772-10778,10782-10785,10787-10792,10794-10795,10798,10805-10806 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r10633 | yury | 2008-04-12 16:14:55 +0200 (Sa, 12 Apr 2008) | 1 line

* Updated readme about running test suite on arm-wince device.
........
r10791 | florian | 2008-04-25 21:46:28 +0200 (Fr, 25 Apr 2008) | 5 lines

o readme.txt update by Karl-Michael Schindler:
* Put the usage paragraph to the top.
+ Add the now required make option TEST_FPC=path_to_your_compiler
* corrected "make rundigest" to "make digest"
* several small layout and wording changes
........
r10792 | florian | 2008-04-25 21:48:12 +0200 (Fr, 25 Apr 2008) | 1 line

* link to results corrected
........
r10805 | florian | 2008-04-26 22:20:26 +0200 (Sa, 26 Apr 2008) | 3 lines

+ infrastructure for tests depending on packages, by default, package tests are executed.
Setting QUICKTEST when calling the makefile disables package tests
* first tests moved
........
r10806 | florian | 2008-04-26 22:23:43 +0200 (Sa, 26 Apr 2008) | 2 lines

* another test moved to packages
........

git-svn-id: branches/fixes_2_2@10953 -

florian 17 年之前
父节点
当前提交
bdad4b63a6

+ 3 - 3
.gitattributes

@@ -5997,7 +5997,6 @@ tests/bench/stream.pp svneol=native#text/x-pascal
 tests/bench/timer.pas svneol=native#text/plain
 tests/bench/whet.pas svneol=native#text/plain
 tests/dbdigest.cfg.example -text
-tests/packages/webtbs/tw3820.pp svneol=native#text/plain
 tests/readme.txt svneol=native#text/plain
 tests/tbf/tb0001.pp svneol=native#text/plain
 tests/tbf/tb0002.pp svneol=native#text/plain
@@ -7188,6 +7187,9 @@ tests/test/opt/treg3.pp svneol=native#text/plain
 tests/test/opt/treg4.pp svneol=native#text/plain
 tests/test/opt/tretopt.pp svneol=native#text/plain
 tests/test/opt/tspace.pp svneol=native#text/plain
+tests/test/packages/webtbs/tw1808.pp svneol=native#text/plain
+tests/test/packages/webtbs/tw3820.pp svneol=native#text/plain
+tests/test/packages/win-base/tdispvar1.pp svneol=native#text/plain
 tests/test/t4cc1.pp svneol=native#text/plain
 tests/test/t4cc2.pp svneol=native#text/plain
 tests/test/tabstrcl.pp svneol=native#text/plain
@@ -7222,7 +7224,6 @@ tests/test/tclass8.pp svneol=native#text/plain
 tests/test/tclrprop.pp svneol=native#text/plain
 tests/test/tcmp.pp svneol=native#text/plain
 tests/test/tcmp0.pp svneol=native#text/plain
-tests/test/tdispvar1.pp svneol=native#text/plain
 tests/test/tendian1.pp svneol=native#text/plain
 tests/test/tenum1.pp svneol=native#text/plain
 tests/test/tenum2.pp svneol=native#text/plain
@@ -8075,7 +8076,6 @@ tests/webtbs/tw1780.pp svneol=native#text/plain
 tests/webtbs/tw1792.pp svneol=native#text/plain
 tests/webtbs/tw1792a.pp svneol=native#text/plain
 tests/webtbs/tw1798.pp svneol=native#text/plain
-tests/webtbs/tw1808.pp svneol=native#text/plain
 tests/webtbs/tw1820.pp svneol=native#text/plain
 tests/webtbs/tw1825.pp svneol=native#text/plain
 tests/webtbs/tw1850.pp svneol=native#text/plain

+ 7 - 1
tests/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/04/18]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/05/12]
 #
 default: allexectests
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -1430,6 +1430,12 @@ ifndef LOG
 export LOG:=$(TEST_OUTPUTDIR)/log
 endif
 TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem
+TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs
+ifdef QUICKTEST
+export QUICKTEST
+else
+override TESTSUBDIRS+=TESTSUBDIRS $(TESTPACKAGESUBDIRS)
+endif
 TESTDIRS:=test $(addprefix test/,$(TESTSUBDIRS))
 .PHONY: utils units copyfiles testprep
 utils:

+ 7 - 0
tests/Makefile.fpc

@@ -123,6 +123,13 @@ endif
 
 # Subdirs available in the test subdir
 TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem
+TESTPACKAGESUBDIRS=cg packages/win-base packages/webtbs
+
+ifdef QUICKTEST
+export QUICKTEST
+else
+override TESTSUBDIRS+=TESTSUBDIRS $(TESTPACKAGESUBDIRS)
+endif
 
 # All full dirnames in the test/ dir including the subdir self
 TESTDIRS:=test $(addprefix test/,$(TESTSUBDIRS))

+ 87 - 56
tests/readme.txt

@@ -1,18 +1,42 @@
+Usage
+-----
+To start the test suite execute:
+
+  make full TEST_FPC=path_to_your_compiler
+
+This should run all tests, scan the created log file and output some
+statistics.
+
+  make digest TEST_FPC=path_to_your_compiler
+
+scans the created log file and outputs some statistics
+
+  make digest USESQL=YES TEST_FPC=path_to_your_compiler
+
+sends the results to an SQL database
+
+When the tests are performed, first the units (e.g. rtl) needed by the
+tests are compiled in a clean determined way and put in the units
+directory. Then webtbs/webtbf/test/tbs/tbf are searched for t*.pp to be
+compiled and executed as tests.
+
+
 Directories
 -----------
 webtbs...........Tests for web-bug-database bugs (should compile/run)
                    Digits in filename refer to bug database entry
 webtbf...........Tests for web-bug-database bugs (should not compile/run)
                    Digits in filename refer to bug database entry
-test.............Testsuites for different aspects of the compiler/rtl etc
+test.............Test suites for different aspects of the compiler/rtl etc
+test/packages....Tests depending on packages. The tests are sorted by package
+                 though this is not mandatory because tests can depend on
+                 multiple packages
 tbs..............Tests for other bugs, added by the fpc core team
                    (success in compilation) Digits in filename is a serial no
 tbf..............Tests for other bugs, added by the fpc core team
                    (fail compile) Digits in filename is a serial no
 units............Helper units for doing the tests
 utils............Utilities for processing tests
-packages.........Tests for packages: to run these tests, the full fpc sources
-                 must be built
 
 
 Writing a test
@@ -24,17 +48,16 @@ It should return 0 on success, any other value indicates failure.
 
 Test directives
 ---------------
-At the top of the test source code, some directives
-can be used to determine how the tests will be
-processed (if processed automatically via make),
-e. g. {%CPU=i386} :
+At the top of the test source code, some directives can be used to
+determine how the tests will be processed (if processed automatically via
+make), e.g. {%CPU=i386}:
 
 OPT................Compiler option required to compile
 CPU................Only for these CPU's (i386,m68k,etc). Might be a list.
 SKIPCPU............Not for these CPU's (i386,m68k,etc). Might be a list.
-TARGET.............Only for these OS targets (win32,macos,etc).
+TARGET.............Only for these OS targets (win32,MacOS,etc).
                    Might be a list.
-SKIPTARGET.........Not for these OS targets (win32,macos,etc).
+SKIPTARGET.........Not for these OS targets (win32,MacOS,etc).
                    Might be a list.
 VERSION............Compiler with at lest this version number required.
 MAXVERSION.........Compiler with at most this version number required.
@@ -59,34 +82,22 @@ KNOWNCOMPILEERROR..Known bug, which manifest itself at compile time. To
                    the right of the equal sign is the expected exit code
                    from compiler, followed by an optional note. Will not
                    be logged as a bug.
+QUICKTEST..........If set, only tests without package dependencies are executed
 
   NOTE: A list consists of comma separated items, e. g. CPU=i386,m68k,powerpc
         No space between the elements and the comma.
 
-Usage
------
-To actually start the testsuite:
-do a simple
-make full This should create a log of all failed tests.
-
-make rundigest scans the created log file and outputs some statistics
-make rundigest USESQL=YES sends the results to an SQL database
-
-When the tests are performed, first the units (e g rtl) needed by the tests
-are compiled in a clean determined way and put in the units directory. Then
-webtbs/webtbf/test/tbs/tbf are searched for t*.pp to be compiled
-and executed as tests.
 
 Controling testing in more detail
 ---------------------------------
-Calling "make full" will preform tests in a standard manner. To have
-more control of the test process we must differentiate between:
+Calling "make full" will perform tests in a standard manner. To have
+more control of the test process one must distinguish between:
 
-* Driver enviroment: compiler/rtl etc to be used by the tools which
+* Driver enviroment: compiler/rtl etc. to be used by the tools which
   runs and analyze the tests. All normal options to make, like FPC
-  OS_TARGET, OPT etc controls this.
+  OS_TARGET, OPT etc. controls this.
 
-* Test environment:  compiler/rtl etc to be tested, to be used
+* Test environment:  compiler/rtl etc. to be tested, to be used
   *in* the tests. Ususal options, prepended with TEST_ , controls
   this. If no such options are given, test and driver environment
   will be the same.
@@ -103,21 +114,23 @@ TEST_FPC_VERSION       defaults to version of TEST_FPC
 TEST_CCOMPILER         defaults to installed gcc compiler, but only
                        if driver and test full-targets are the same.
 TEST_VERBOSE           let dotest be more verbose, only usefull for debugging
-TEST_DELTEMP           delete temporary executable/object/ppu file, default is off
+TEST_DELTEMP           delete temporary executable/object/ppu file,
+                       default is off
 TEST_TIMEOUT           use timeout wrapper for (remote) execution
 V                      print dotest commandline
 
   (Please add more test options if needed)
 
-NOTE To clean after a test session, "make clean" must be given the same
-options as when running the tests.
+NOTE: To clean after a test session, "make clean TEST_FPC=path_to_your_compiler"
+must be given the same options as when running the tests.
 
 The utils directory is considerd to belong to the driver environment,
-all other directories belongs to the test environment.
+all other directories belong to the test environment.
+
 
 Remote execution
 ----------------
-Also remote execution of the testsuite is possible
+Also remote execution of the test suite is possible.
 
 Requirements:
 - rsh/ssh must work without keyboard interaction or extra parameters
@@ -132,9 +145,11 @@ TEST_REMOTEPATH      set remote path to use, default is /tmp
 TEST_DELBEFORE       delete remote executable before uploading
 TEST_DELTEMP         delete executable after running, so the remote system
                      doesn't need much free disk space
-TEST_REMOTEPW        pass a password with -pw to remote tools, mainly usefull for putty
+TEST_REMOTEPW        pass a password with -pw to remote tools,
+                     mainly usefull for putty
+
 
-Example:
+Examples:
 -------
   make TEST_FPC=$HOME/fpc/compiler/ppcsparc TEST_BINUTILSPREFIX=sparc-linux- \
        TEST_RSH=sunny TEST_REMOTEPATH=/tmp/tests
@@ -148,49 +163,65 @@ Example for win32/putty:
        [email protected] TEST_REMOTEPATH=/tmp TEST_DELTEMP=1 \
        "TEST_REMOTEPW=xxx" FPC=c:\fpc\compiler\ppc386
 
+
 Emulator execution
 ------------------
+Emulator execution is possible as well. It can't be combined with remote
+execution though.
 
-Emulator execution is possible as well. It can't be combined with remote execution though.
+EMULATOR: name of the emulator to use
 
-EMULATOR	     name of the emulator to use
+Examples:
 
-Example:
+  make TEST_FPC=~/fpc/compiler/ppcrossarm TEST_OPT=-XParm-linux- \
+       EMULATOR=qemu-arm
+  make TEST_FPC=~/fpc/compiler/ppcrossarm TEST_OPT=-XParm-linux- \
+       EMULATOR=qemu-arm digest DBDIGESTOPT="-C qemu-arm" USESQL=YES
 
-make TEST_FPC=~/fpc/compiler/ppcrossarm TEST_OPT=-XParm-linux- EMULATOR=qemu-arm
-make TEST_FPC=~/fpc/compiler/ppcrossarm TEST_OPT=-XParm-linux- EMULATOR=qemu-arm \
-     digest DBDIGESTOPT="-C qemu-arm" USESQL=YES
 
-Example cross testing of target MacOS with driver Darwin
+Example cross testing of target Mac OS with driver Darwin
 --------------------------------------------------------
-NOTE Today it is possible to run the test suite MacOS native.
+NOTE: Today, it is possible to run the test suite Mac OS native.
 
-A machine with both MacOS X and classic MacOS installed. Note that make will not
-run the tests, that has to be done in MPW with the scripts in utils/macos.
+A machine with both Mac OS X and classic Mac OS installed is required.
+Note that make will not run the tests.  This has to be done in MPW with the
+scripts in utils/MacOS.
 
-  make clean alltest TEST_OS_TARGET=macos TEST_OPT="-WT -st" \
-       USEUNITDIR=/Projekt/Freepascal/fpc/rtl/macos
+  make clean alltest TEST_OS_TARGET=MacOS TEST_OPT="-WT -st" \
+       USEUNITDIR=/Projekt/Freepascal/fpc/rtl/MacOS
 
-To clean. Note that same options as above has to be given so that the correct
-files will be removed.
+To clean. Note that same options as above has to be given so that the
+correct files will be removed.
+
+  make clean TEST_OS_TARGET=MacOS USEUNITDIR=/Projekt/Freepascal/fpc/rtl/MacOS
 
-  make clean TEST_OS_TARGET=macos USEUNITDIR=/Projekt/Freepascal/fpc/rtl/macos
 
 Example cross testing of target arm-wince
 -----------------------------------------
-//arm-wince example : see FPCTRUNK\DEMO\WINCE\TESTEMU\ for additional required tools
-make TEST_FPC=ppcrossarm TEST_CPU_TARGET=arm TEST_OS_TARGET=wince TEST_OPT="-XParm-wince- -WC -Xs" TEST_REMOTEPATH=\fpctest EMULATOR=MyDisc:\My\Path\to\wcetemu.exe
+//arm-wince example:
+see FPCTRUNK\DEMO\WINCE\TESTEMU\ for additionally required tools
+Connect your device via ActiveSync and execute:
+
+  make TEST_FPC=ppcrossarm TEST_CPU_TARGET=arm TEST_OS_TARGET=wince \
+       TEST_OPT="-XParm-wince- -WC -Xs" \
+       EMULATOR=MyDisc:\My\Path\to\wcetemu.exe
+
+Tests will be performed in the \fpctests folder on the device.
 
-You need to create \fpctest folder on remote device before running testsuite.
 
 Result uploading
 ----------------
-Results can be uploaded to the testsuite result DB (http://www.freepascal.org/cgi-bin/testsuite.cgi) by executing
+Results can be uploaded to the test suite result DB
+(http://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi) by executing
 
-make uploadrun
+  make uploadrun
 
 On unix:
-- The testing machine must be enabled to login on www.freepascal.org automatically as user fpc with ssh.
+- The testing machine must be enabled to login on www.freepascal.org
+  automatically as user fpc with ssh.
+
 On Windows:
 - The putty utilities plink.exe and pscp.exe must be in the path
-- There must be a putty session named [email protected] which is enabled to login automatically into www.freepascal.org
+- There must be a putty session named [email protected] which is
+  enabled to login automatically into www.freepascal.org
+

+ 2 - 2
tests/webtbs/tw1808.pp → tests/test/packages/webtbs/tw1808.pp

@@ -1,7 +1,7 @@
-{ %target=win32, wince }
+{ %target=win32 }
 
 uses
-  windows;
+  CommDlg;
 
 var
   x : DWORD;

+ 0 - 0
tests/packages/webtbs/tw3820.pp → tests/test/packages/webtbs/tw3820.pp


+ 0 - 0
tests/test/tdispvar1.pp → tests/test/packages/win-base/tdispvar1.pp


+ 19 - 3
tests/units/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/04/18]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/05/12]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -1693,7 +1693,7 @@ makefiles: fpc_makefiles
 ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 endif
-.PHONY: rtl extra fpcunit all clean cleanrtl clean_ctest
+.PHONY: rtl extra fpcunit packages all clean cleanrtl clean_ctest
 DUMMYINSTALLDIR=$(BASEDIR)/tmp
 INSTALLOPT=INSTALL_PREFIX=$(DUMMYINSTALLDIR) INSTALL_UNITDIR=$(BASEDIR)/$(COMPILER_TARGETDIR)
 rtl-stamp.$(FULL_TARGET):
@@ -1717,6 +1717,18 @@ cleanfpcunit:
 	$(DELTREE) $(DUMMYINSTALLDIR)
 	-$(DEL) fpcunit-stamp.$(FULL_TARGET)
 fpcunit : fpcunit-stamp.$(FULL_TARGET)
+DUMMYINSTALLDIR=$(BASEDIR)/tmp
+INSTALLOPT=INSTALL_PREFIX=$(DUMMYINSTALLDIR) INSTALL_UNITDIR=$(BASEDIR)/$(COMPILER_TARGETDIR)
+PACKAGESDIR=../../packages
+packages-stamp.$(FULL_TARGET):
+	$(MAKE) -C ../../packages all 'OPT=$(OPT) -n'
+	$(MAKE) -C ../../packages install $(INSTALLOPT)
+	$(ECHO) Compiled > packages-stamp.$(FULL_TARGET)
+cleanpackages:
+	$(DELTREE) $(COMPILER_TARGETDIR)
+	$(DELTREE) $(DUMMYINSTALLDIR)
+	-$(DEL) packages-stamp.$(FULL_TARGET)
+packages : packages-stamp.$(FULL_TARGET)
 TESTOPT=-n -FE$(COMPILER_TARGETDIR) -T$(OS_TARGET) $(OPT)
 ifneq ($(BINUTILSPREFIX),)
 override TESTOPT+=-XP$(BINUTILSPREFIX) -Xc
@@ -1737,7 +1749,11 @@ ctest:
 	@exit 1
 endif
 extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT)
+ifdef QUICKTEST
 all : rtl fpcunit extra
-clean : cleanrtl cleanall cleanfpcunit
+else
+all : rtl fpcunit packages extra
+endif
+clean : cleanrtl cleanall cleanfpcunit cleanpackages
 clean_ctest :
 	-$(DEL) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o

+ 28 - 3
tests/units/Makefile.fpc

@@ -17,7 +17,7 @@ targetdir=$(TARGETSUFFIX)
 fpcdir=../..
 
 [rules]
-.PHONY: rtl extra fpcunit all clean cleanrtl clean_ctest
+.PHONY: rtl extra fpcunit packages all clean cleanrtl clean_ctest
 
 #############################
 # RTL
@@ -40,7 +40,7 @@ rtl : rtl-stamp.$(FULL_TARGET)
 
 
 #############################
-# RTL
+# FPCUnit
 #
 
 DUMMYINSTALLDIR=$(BASEDIR)/tmp
@@ -60,6 +60,27 @@ cleanfpcunit:
 fpcunit : fpcunit-stamp.$(FULL_TARGET)
 
 
+#############################
+# Packages
+#
+
+DUMMYINSTALLDIR=$(BASEDIR)/tmp
+INSTALLOPT=INSTALL_PREFIX=$(DUMMYINSTALLDIR) INSTALL_UNITDIR=$(BASEDIR)/$(COMPILER_TARGETDIR)
+PACKAGESDIR=../../packages
+
+packages-stamp.$(FULL_TARGET):
+        $(MAKE) -C ../../packages all 'OPT=$(OPT) -n'
+        $(MAKE) -C ../../packages install $(INSTALLOPT)
+        $(ECHO) Compiled > packages-stamp.$(FULL_TARGET)
+
+cleanpackages:
+        $(DELTREE) $(COMPILER_TARGETDIR)
+        $(DELTREE) $(DUMMYINSTALLDIR)
+        -$(DEL) packages-stamp.$(FULL_TARGET)
+
+packages : packages-stamp.$(FULL_TARGET)
+
+
 #############################
 # Extra units
 #
@@ -98,9 +119,13 @@ extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT)
 # Main rules
 #
 
+ifdef QUICKTEST
 all : rtl fpcunit extra
+else
+all : rtl fpcunit packages extra
+endif
 
-clean : cleanrtl cleanall cleanfpcunit
+clean : cleanrtl cleanall cleanfpcunit cleanpackages
 
 clean_ctest :
         -$(DEL) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o