Execute tests by calling another Makefile
This commit is contained in:
parent
12b6da5c90
commit
57114e159f
2 changed files with 15 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -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
13
imag-link/tests/Makefile
Normal 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:
|
||||
|
Loading…
Reference in a new issue