Execute tests by calling another Makefile

This commit is contained in:
Matthias Beyer 2016-09-10 09:50:16 +02:00
parent 12b6da5c90
commit 57114e159f
2 changed files with 15 additions and 1 deletions

View file

@ -4,6 +4,7 @@ bin = $@/target/debug/$@
doc-crate-toml=./.imag-documentation/Cargo.toml
ECHO=$(shell which echo) -e
MAKE=$(shell which make)
BASH=$(shell which bash)
CARGO=$(shell which cargo)
@ -69,7 +70,7 @@ $(TARGETS): %: .FORCE
$(BIN_TARGET_TESTS): %: .FORCE
@$(ECHO) "\t[BINTEST]:\t$@"
$(shell find $(subst -test,,$@) -name "*test.sh" -exec $(BASH) {} \;)
find $(subst -test,,$@) -name "tests" -type d -exec $(MAKE) -j 1 -C {} \;
$(RELEASE_TARGETS): %: .FORCE
@$(ECHO) "\t[RELEASE]:\t$(subst -release,,$@)"

13
imag-link/tests/Makefile Normal file
View file

@ -0,0 +1,13 @@
ECHO=$(shell which echo) -e
TARGETS=$(shell find -name "*test.sh" -type f)
BASH=$(shell which bash)
all: $(TARGETS)
@$(ECHO) $(TARGETS)
$(TARGETS): %: .FORCE
@$(ECHO) "\t[BASH ]:\t$@"
@$(BASH) $@
.FORCE: