changeset 58842:560b2becbe87

8237914: The test-make target does not fail on test failure Reviewed-by: tbell, ihse
author erikj
date Thu, 30 Jan 2020 12:00:38 -0800
parents 8d8bd676484d
children 8482ab8f9b4c
files make/RunTests.gmk
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/RunTests.gmk	Thu Jan 30 11:29:51 2020 -0800
+++ b/make/RunTests.gmk	Thu Jan 30 12:00:38 2020 -0800
@@ -1073,10 +1073,14 @@
 	$$(call LogWarn, Test report is stored in $$(strip \
 	    $$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
 	$$(call LogWarn, Warning: Special test results are not properly parsed!)
-	$$(eval $1_PASSED := 0)
-	$$(eval $1_FAILED := 0)
+	$$(eval $1_PASSED := $$(shell \
+	  if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 1; else $(ECHO) 0; fi \
+	))
+	$$(eval $1_FAILED := $$(shell \
+	  if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 0; else $(ECHO) 1; fi \
+	))
 	$$(eval $1_ERROR := 0)
-	$$(eval $1_TOTAL := 0)
+	$$(eval $1_TOTAL := 1)
 
   $1: run-test-$1 parse-test-$1