8167600: jib make run-test for langtools and intermittent failures on windows-x86
authortbell
Wed, 19 Oct 2016 07:48:49 -0700
changeset 41632 c599331f6040
parent 41631 a348d1cc8d9d
child 41633 eec0f5b0465f
8167600: jib make run-test for langtools and intermittent failures on windows-x86 Reviewed-by: ihse
langtools/test/Makefile
--- a/langtools/test/Makefile	Wed Oct 19 12:42:37 2016 +0200
+++ b/langtools/test/Makefile	Wed Oct 19 07:48:49 2016 -0700
@@ -157,11 +157,6 @@
 	-refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH)
 endif
 
-ifeq ($(ARCH_DATA_MODEL),32)
-  # Set the GC options for test vms
-  JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC
-  JTREG_OPTIONS += $(JTREG_GC_OPTION)
-endif
 # Set the max memory for jtreg target test JVMs
 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx768m
 JTREG_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION)
@@ -256,6 +251,17 @@
 JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
 JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
 
+# Is the test JVM 32-bit?
+DATA_MODEL := \
+	$(shell $(JT_JAVA)/bin/java -XshowSettings:properties -version 2>&1 | \
+		grep 'sun\.arch\.data\.model' | \
+		awk '{print $$3}')
+ifeq ($(DATA_MODEL), 32)
+  # Set the GC options for test vms having a smaller address space
+  JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC
+  JTREG_OPTIONS += $(JTREG_GC_OPTION)
+endif
+
 # Default make rule -- warning, may take a while
 all: $(JPRT_CLEAN) jtreg-tests jck-compiler-tests jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) all-summary
 	@echo "Testing completed successfully"