From 3ab90ac5be0f82dff2d90ecde93666c4b90afe38 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Wed, 23 Oct 2019 05:48:17 -0700 Subject: [PATCH] 8232834: RunTest sometimes fails to produce valid exitcode.txt Reviewed-by: ihse --- make/RunTests.gmk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/make/RunTests.gmk b/make/RunTests.gmk index b2260c75b08..a6a6d1caf76 100644 --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -185,13 +185,13 @@ define SetupAotModuleBody $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/jaotc \ $$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \ ) - $$(call ExecuteWithLog, $$@.check, \ + $$(call ExecuteWithLog, $$@.check, ( \ $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/java \ $$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions \ -XX:+PrintAOT -XX:+UseAOTStrictLoading \ -XX:AOTLibrary=$$@ -version \ > $$@.verify-aot \ - ) + )) $1_AOT_OPTIONS += -XX:+UnlockExperimentalVMOptions $1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB) @@ -593,7 +593,7 @@ define SetupRunGtestTestBody $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) - $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \ + $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \ $$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \ -jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \ --gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ @@ -602,7 +602,7 @@ define SetupRunGtestTestBody > >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \ && $$(ECHO) $$$$? > $$($1_EXITCODE) \ || $$(ECHO) $$$$? > $$($1_EXITCODE) \ - ) + )) $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt @@ -705,7 +705,7 @@ define SetupRunMicroTestBody $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) - $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \ + $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, ( \ $$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \ -jar $$($1_MICRO_BENCHMARKS_JAR) \ $$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \ @@ -715,7 +715,7 @@ define SetupRunMicroTestBody > >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \ && $$(ECHO) $$$$? > $$($1_EXITCODE) \ || $$(ECHO) $$$$? > $$($1_EXITCODE) \ - ) + )) $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/micro.txt @@ -928,7 +928,7 @@ define SetupRunJtregTestBody $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) - $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \ + $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \ $$(COV_ENVIRONMENT) \ $$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \ -Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \ @@ -943,7 +943,7 @@ define SetupRunJtregTestBody $$($1_TEST_NAME) \ && $$(ECHO) $$$$? > $$($1_EXITCODE) \ || $$(ECHO) $$$$? > $$($1_EXITCODE) \ - ) + )) $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt @@ -1019,12 +1019,12 @@ define SetupRunSpecialTestBody $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) - $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \ + $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, ( \ $$($1_TEST_COMMAND_LINE) \ > >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \ && $$(ECHO) $$$$? > $$($1_EXITCODE) \ || $$(ECHO) $$$$? > $$($1_EXITCODE) \ - ) + )) $1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt