diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-09-10 09:50:16 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-09-19 10:07:18 +0200 |
commit | 57114e159fc9d42126c30efbdb561ea0564074eb (patch) | |
tree | 4fbd1b214817e788ef168ced7d3e85eaa61769ee | |
parent | 12b6da5c905796d49acd35b33b8174b8aec6448c (diff) |
Execute tests by calling another Makefile
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | imag-link/tests/Makefile | 13 |
2 files changed, 15 insertions, 1 deletions
@@ -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,,$@)" diff --git a/imag-link/tests/Makefile b/imag-link/tests/Makefile new file mode 100644 index 00000000..2713587a --- /dev/null +++ b/imag-link/tests/Makefile @@ -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: + |