changeset 3715:b6f22cf3714e

8167600: jib make run-test for langtools and intermittent failures on windows-x86 Reviewed-by: ihse
author tbell
date Wed, 19 Oct 2016 07:48:49 -0700
parents d02323f750f6
children 96a5248fbf04
files test/Makefile
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/Makefile	Wed Oct 19 12:42:37 2016 +0200
+++ b/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"