diff --git a/configure/RULES.Db b/configure/RULES.Db index 436c05a9a..45acff5da 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -134,7 +134,7 @@ ACTIONS += build ACTIONS += install ACTIONS += buildInstall ACTIONS += browse -ACTIONS += runtests +ACTIONS += runtests tapfiles actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch))) diff --git a/configure/RULES_ARCHS b/configure/RULES_ARCHS index eba7cfab5..1d4c2d4c1 100644 --- a/configure/RULES_ARCHS +++ b/configure/RULES_ARCHS @@ -17,7 +17,7 @@ ACTIONS += build ACTIONS += install ACTIONS += buildInstall ACTIONS += browse -ACTIONS += runtests +ACTIONS += runtests tapfiles #ACTIONS += rebuild actionPart = $(word 1, $(subst $(DIVIDER), ,$@)) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 36e21f547..bba3cdc73 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -96,6 +96,8 @@ ifneq (,$(strip $(TESTS))) TARGETS += testspec endif +TAPFILES += $(TESTSCRIPTS:.t=.tap) + #--------------------------------------------------------------- # Libraries # @@ -142,7 +144,8 @@ clean:: @$(RM) *.i *$(OBJ) *.a $(TESTPRODNAME) $(LIBNAME) $(SHRLIBNAME) \ $(INC) $(TARGETS) $(DLL_LINK_LIBNAME) $(TDS) \ *.out MakefileInclude $(LOADABLE_SHRLIBNAME) *.manifest *.exp \ - $(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) $(TESTSCRIPTS) + $(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) \ + $(TESTSCRIPTS) $(TAPFILES) ifdef RES @$(RM) *$(RES) endif @@ -338,16 +341,22 @@ testspec: $(TESTSCRIPTS) $(if $^, @echo Tests: $^ >> $@) $(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@) +tapfiles: $(TESTSCRIPTS) $(TAPFILES) + +# A .tap file is the output from running the associated test script +%.tap: %.t + -$(PERL) $< -tap > $@ + # If there's a perl test script (.plt) available, use it %.t: ../%.plt @$(RM) $@ - @$(CP) $< $@ + $(CP) $< $@ -# Some versions of Test::Harness expect test programs in perl only. +# Test programs (.t files) must be written in Perl. # Generate a perl program to exec the real test binary. -%.t: %$(EXE) +%.t: %$(EXE) $(TOOLS)/makeTestfile.pl @$(RM) $@ - @$(PERL) $(TOOLS)/makeTestfile.pl $@ $< + $(PERL) $(TOOLS)/makeTestfile.pl $@ $< #--------------------------------------------------------------- ## Install rules for BIN_INSTALLS and LIB_INSTALLS diff --git a/configure/RULES_DIRS b/configure/RULES_DIRS index edf200ad6..8fd3f63b6 100644 --- a/configure/RULES_DIRS +++ b/configure/RULES_DIRS @@ -12,7 +12,8 @@ ARCHS += $(BUILD_ARCHS) -ACTIONS += inc build install buildInstall clean realclean archclean runtests +ACTIONS += inc build install buildInstall clean realclean archclean +ACTIONS += runtests tapfiles dirPart = $(join $(dir $@), $(word 1, $(subst $(DIVIDER), ,$(notdir $@)))) diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index bd0a375ad..f95eb2e03 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -13,6 +13,15 @@ +
tapfilesbuild target from 3.15
This GNUmake target runs the same tests as the runtests
target, but
+instead of summarizing or displaying the output for each test script it creates
+a .tap
file inside the architecture build directory which contains the
+detailed test output. The output file can be parsed by continuous integration
+packages such as Jenkins to show the
+test results.