diff --git a/configure/RULES.Db b/configure/RULES.Db index 5105c4c6a..7836d280e 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -154,7 +154,7 @@ ACTIONS = inc ACTIONS += build ACTIONS += install ACTIONS += buildInstall -ACTIONS += runtests tapfiles junitfiles +ACTIONS += runtests tapfiles clean-tests test-results junitfiles actionArchTargets = $(foreach action, $(ACTIONS), \ $(foreach arch, $(BUILD_ARCHS), $(action)$(DIVIDER)$(arch))) diff --git a/configure/RULES_ARCHS b/configure/RULES_ARCHS index 6a77a6e9e..dc3fa04fe 100644 --- a/configure/RULES_ARCHS +++ b/configure/RULES_ARCHS @@ -14,7 +14,7 @@ ACTIONS = inc ACTIONS += build ACTIONS += install ACTIONS += buildInstall -ACTIONS += runtests tapfiles junitfiles +ACTIONS += runtests tapfiles clean-tests test-results junitfiles actionArchTargets = $(foreach action, $(ACTIONS), \ $(addprefix $(action)$(DIVIDER), $(BUILD_ARCHS))) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 64774fb88..4440b2345 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -345,6 +345,21 @@ testspec: $(TESTSCRIPTS) $(if $(TESTFILES), @echo Files: $(TESTFILES) >> $@) $(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@) +test-results: tapfiles +ifneq ($(TAPFILES),) +ifdef RUNTESTS_ENABLED + prove --failures --ext .tap --exec cat --color $(TAPFILES) +endif +endif + +clean-tests: +ifneq ($(TAPFILES),) + $(RM) $(TAPFILES) +endif +ifneq ($(JUNITFILES),) + $(RM) $(JUNITFILES) +endif + tapfiles: $(TESTSCRIPTS) $(TAPFILES) junitfiles: $(JUNITFILES) @@ -509,7 +524,7 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: % .PRECIOUS: $(COMMON_INC) .PHONY: all host inc build install clean rebuild buildInstall build_clean -.PHONY: runtests tapfiles junitfiles +.PHONY: runtests tapfiles clean-tests test-results junitfiles .PHONY: checkRelease warnRelease noCheckRelease FORCE endif # BASE_RULES_BUILD diff --git a/configure/RULES_DIRS b/configure/RULES_DIRS index 87c0e7318..37cea5e9a 100644 --- a/configure/RULES_DIRS +++ b/configure/RULES_DIRS @@ -9,7 +9,7 @@ ARCHS += $(BUILD_ARCHS) ACTIONS += inc build install buildInstall clean realclean archclean -ACTIONS += runtests tapfiles junitfiles +ACTIONS += runtests tapfiles clean-tests test-results junitfiles dirActionArchTargets = $(foreach dir, $(DIRS), \ $(foreach action, $(ACTIONS), \ diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index c2e24fb7f..4c0ce4701 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -599,13 +599,38 @@ tells git to ignore all configure/*.local files.

-

Self-test JUnit XML Output

+

New test-related make targets

-

This release adds a new make target junitfiles which if necessary -runs the self-tests and then converts the TAP (Perl Test-Anything-Protocol) -output files (as generated by the tapfiles target) into the more -commonly-recognized JUnit XML format. The program that performs this conversion -needs the Perl module XML::Generator to have been installed.

+

This release adds several new make targets intended for use by developers +and Continuous Integration systems which simplify the task of running the +built-in self-test programs and viewing the results. Since these targets are +intended for limited use they can have requirements for the build host which +go beyond the standard minimum set needed to build and run Base.

+ +
+ +

test-results — Summarize test results

+ +

The new make target test-results will run the self-tests if +necessary to generate a TAP file for each test, then summarizes the TAP output +files in each test directory in turn, displaying the details of any failures. +This step uses the program prove which comes with Perl, but also needs +cat to be provided in the default search path so will not work on most +Windows systems.

+ +

junitfiles — Convert test results to JUnit XML Format

+ +

The new make target junitfiles will run the self-tests if necessary +and then convert the TAP output files into the more commonly-supported JUnit +XML format. The program that performs this conversion needs the Perl module +XML::Generator to have been installed.

+ +

clean-tests — Delete test result files

+ +

The new make target clean-tests removes any test result files from +previous test runs. It cleans both TAP and JUnit XML files.

+ +

Fix DNS related crash on exit