From 8a21ce2567a9a7ba39159df6855f9348aa1b9c89 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Mon, 13 Mar 2017 15:41:57 +0900 Subject: make returns 1 if tests fail --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1c00636..b650aa4 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ TEST_EXE=$(addprefix $(EXE_DIR)/,$(TEST_SRC:.cpp=.exe)) test: $(TEST_EXE) @echo test $(TEST_EXE) @sh -ec 'for i in $(TEST_EXE); do $$i|grep "ctest:name"; done' > result.txt - @grep -v "ng=0, exception=0" result.txt || echo "all unit tests are ok" + @grep -v "ng=0, exception=0" result.txt; if [ $$? -eq 1 ]; then echo "all unit tests succeed"; else exit 1; fi run_go: go/main.go $(BLS_LIB) $(BLS_IF_LIB) # cd go && env GODEBUG=cgocheck=0 go run main.go -- cgit v1.2.3