Fix for GitHub issue #293
Ensure local build targets are up to date before running tests.
This commit is contained in:
@ -373,11 +373,11 @@ $(MODNAME): %$(MODEXT): %$(EXE)
|
|||||||
# Automated testing
|
# Automated testing
|
||||||
|
|
||||||
runtests: run-tap-tests
|
runtests: run-tap-tests
|
||||||
run-tap-tests: $(TESTSCRIPTS.t)
|
run-tap-tests: | build
|
||||||
ifneq ($(TESTSCRIPTS.t),)
|
ifneq ($(TESTSCRIPTS.t),)
|
||||||
ifdef RUNTESTS_ENABLED
|
ifdef RUNTESTS_ENABLED
|
||||||
$(ECHO) "$(PROVE) $^"
|
$(ECHO) "$(PROVE) $(TESTSCRIPTS.t)"
|
||||||
@$(PROVE) $^ || $(PROVE_FAILURE)
|
@$(PROVE) $(TESTSCRIPTS.t) || $(PROVE_FAILURE)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -390,8 +390,8 @@ test-results: tap-results
|
|||||||
tap-results: $(TAPFILES)
|
tap-results: $(TAPFILES)
|
||||||
ifneq ($(strip $(TAPFILES)),)
|
ifneq ($(strip $(TAPFILES)),)
|
||||||
ifdef RUNTESTS_ENABLED
|
ifdef RUNTESTS_ENABLED
|
||||||
$(ECHO) "$(PROVE.tap) $^"
|
$(ECHO) "$(PROVE.tap) $(TAPFILES)"
|
||||||
@$(PROVE.tap) $^ || $(PROVE_FAILURE)
|
@$(PROVE.tap) $(TAPFILES) || $(PROVE_FAILURE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CURRENT_TAPFILES := $(wildcard $(TAPFILES))
|
CURRENT_TAPFILES := $(wildcard $(TAPFILES))
|
||||||
@ -407,7 +407,7 @@ ifneq ($(CURRENT_JUNITFILES),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# A .tap file is the output from running the associated test script
|
# A .tap file is the output from running the associated test script
|
||||||
$(TAPFILES.t): %.tap: %.t
|
$(TAPFILES.t): %.tap: %.t | build
|
||||||
ifdef RUNTESTS_ENABLED
|
ifdef RUNTESTS_ENABLED
|
||||||
$(ECHO) "$(PERL) $< -tap > $@"
|
$(ECHO) "$(PERL) $< -tap > $@"
|
||||||
@$(PERL) $< -tap > $@ || $(TAPFILE_FAILURE)
|
@$(PERL) $< -tap > $@ || $(TAPFILE_FAILURE)
|
||||||
|
Reference in New Issue
Block a user