Add cargo test call for binaries

This commit is contained in:
Matthias Beyer 2017-06-07 22:11:20 +02:00
parent 6ded27c6ea
commit a8062b0446
1 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,8 @@ $(TARGETS): %: .FORCE
@$(CARGO) build --manifest-path ./$@/Cargo.toml
$(BIN_TARGET_TESTS): %-test: % .FORCE
@$(ECHO) "\t[CARGO ][TEST]: \t$@"
@$(CARGO) test --manifest-path ./$(subst -test,,$@)/Cargo.toml
@$(ECHO) "\t[BINTEST]:\t$@"
if [ -f $(subst -test,,$@)/tests/Makefile ]; then \
$(MAKE) -C $(subst -test,,$@)/tests || exit 1;\