41.5 The TestSuite Executable

The file test/TestSuite.as is generated by tools/generateTestSuite.pl.nw from the source files that are listed in test/tcasfiles.list.

By making the target check, the test suite is compiled and executed.

Which variant is actually built depends on the setting of the variable VARIANT. If it is not set, the first variant mentioned in VARIANTSTOBUILD is used.

In order to check a certain variant, one should, for example, issue

make VARIANT=debug check

where debug is an entry in VARIANTSTOBUILD. Without giving the VARIANT explicitly, the first value of VARIANTSTOBUILD is taken by default.

555generating and executing the TestSuite 555  (542)
test: all TestSuite.as

TestSuite.as: tcasfiles.list $(SRCS:%=%.signatures.as)
        $(PERL) $(TOOLS)/generateTestSuite.pl tcasfiles.list \
                ${PROJECTNAME} > TestSuite.as

check: test
        if [ -z "$(VARIANT)" ]; then \
            $(MAKE) check.$(firstword $(VARIANTSTOBUILD));\
        else\
            $(MAKE) check.$(VARIANT);\
        fi

$(VARIANTSTOBUILD:%=check.%): check.%: test
        $(MAKE) EXECUTABLE=TestSuite executablevariant.$*
        $(CP) TestSuite$(VARIANTPOSTFIX$*) $(PROJECTROOT)
        @echo "*** Starting $(PROJECTROOT)/TestSuite$(VARIANTPOSTFIX$*) ***"
        $(PROJECTROOT)/TestSuite$(VARIANTPOSTFIX$*)

Uses all 350, check 357, CP 354a, executablevariant 453, PERL 431b, PROJECTNAME 127, PROJECTROOT 350, SRCS 468a, tcasfiles.list 549, test 357, TOOLS 428b, VARIANTPOSTFIX 134, and VARIANTSTOBUILD 131.