make check: Fail if the tests failed
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 4 Jun 2016 12:13:45 +0000 (14:13 +0200)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Thu, 9 Jun 2016 17:29:57 +0000 (10:29 -0700)
Makefile.in

index 42baa8dfff5f370b6aa5f8cc8daa301897312123..b33eff4d94da7bca3a2b3ea3ffe42cc0acfb5935 100644 (file)
@@ -339,10 +339,12 @@ junk += $(bintest_outs)
        ./$* < /dev/null 2>&1 | tee $@
 
 check-cpp : $(test_outs)
-       echo; grep -h -e'Unit Tests' -e'FAILED' -e'Segmentation' $^ < /dev/null; echo
+       @echo
+       ! grep -h -e'Unit Tests' -e'FAILED' -e'Segmentation' $^ < /dev/null
+       @echo
 
 check-bin : $(bintest_outs)
-       tail -n 1 $^ < /dev/null
+       ! tail -n 1 $^ < /dev/null 2>&1 | grep FAILED
 
 check : check-cpp check-bin