Added new 'tapfiles' build target.

There's a plugin for Jenkins which should be able to read the .tap
output files and generate pretty test status pages from them.
I haven't actually tried using it yet though...
This commit is contained in:
Andrew Johnson
2013-04-04 11:25:53 -05:00
parent 2c8eb630cb
commit f661299a81
5 changed files with 28 additions and 9 deletions

View File

@@ -129,7 +129,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)))
@@ -144,10 +144,10 @@ buildInstall : build
rebuild: clean install
.PHONY: all inc build install clean rebuild buildInstall
.PHONY: all $(ACTIONS)
$(actionArchTargets) $(BUILD_ARCHS):install
$(cleanArchTargets):clean
$(actionArchTargets) $(BUILD_ARCHS): install
$(cleanArchTargets): clean
.PHONY: $(BUILD_ARCHS) $(actionArchTargets) $(cleanArchTargets)

View File

@@ -17,7 +17,7 @@ ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += browse
ACTIONS += runtests
ACTIONS += runtests tapfiles
#ACTIONS += rebuild
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))

View File

@@ -98,6 +98,8 @@ ifneq (,$(strip $(TESTS)))
TARGETS += testspec
endif
TAPFILES += $(TESTSCRIPTS:.t=.tap)
#---------------------------------------------------------------
# Libraries
#
@@ -147,7 +149,8 @@ build_clean:
$(LOADABLE_SHRLIBNAME) \
$(INC) $(TARGETS) $(TDS) $(CLEANS) \
*.out MakefileInclude *.manifest *.exp \
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) $(TESTSCRIPTS)
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) \
$(TESTSCRIPTS) $(TAPFILES)
ifdef RES
@$(RM) *$(RES)
endif
@@ -324,12 +327,18 @@ testspec: $(TESTSCRIPTS)
$(if $(TESTFILES), @echo Files: $(TESTFILES) >> $@)
$(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
-HARNESS_ACTIVE=1 $(PERL) $< > $@
# If there's a perl test script (.plt) available, use it
%.t: ../%.plt
@$(RM) $@
$(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)
@$(RM) $@
@@ -464,7 +473,7 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: %
.PRECIOUS: $(COMMON_INC)
.PHONY: all inc build install clean rebuild buildInstall build_clean
.PHONY: runtests checkRelease warnRelease noCheckRelease
.PHONY: runtests tapfiles checkRelease warnRelease noCheckRelease
endif # BASE_RULES_BUILD
# EOF RULES_BUILD

View File

@@ -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 $@))))

View File

@@ -15,6 +15,15 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.</p>
<h2 align="center">Changes between 3.15.0.1 and 3.15.0.2</h2>
<!-- Insert new items immediately below here ... -->
<h3>New build target <q>tapfiles</q></h3>
<p>This new make target runs the same tests as the <q>runtests</q> target, but
instead of summarizing or displaying the output for each test script it creates
a <q>.tap</q> file inside the architecture build directory which contains the
detailed test output. The output file can be parsed by continuous integration
packages such as <a href="http://www.jenkins-ci.org/">Jenkins</a> to show the
test results.</p>
<h3>Array field double-buffering</h3>
<p>Array data can now be moved, without copying, into and out of the VAL field