Merge
authorjwilhelm
Sun, 12 Feb 2017 04:49:38 +0100
changeset 43923 5baba098c4bd
parent 43663 4416065868c1 (current diff)
parent 43921 d956a2151cba (diff)
child 43924 33013da504f1
Merge
common/autoconf/generated-configure.sh
--- a/common/autoconf/generated-configure.sh	Fri Feb 10 08:21:20 2017 -0800
+++ b/common/autoconf/generated-configure.sh	Sun Feb 12 04:49:38 2017 +0100
@@ -5170,7 +5170,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1486679715
+DATE_WHEN_GENERATED=1486871372
 
 ###############################################################################
 #
--- a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java	Fri Feb 10 08:21:20 2017 -0800
+++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java	Sun Feb 12 04:49:38 2017 +0100
@@ -199,6 +199,10 @@
             throws Throwable {
         List<String> finalOptions = new ArrayList<>();
         finalOptions.add(CommandLineOptionTest.getVMTypeOption());
+        String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated();
+        if (extraFlagForEmulated != null) {
+            finalOptions.add(extraFlagForEmulated);
+        }
         Collections.addAll(finalOptions, options);
 
         CommandLineOptionTest.verifyJVMStartup(expectedMessages,
@@ -390,6 +394,10 @@
             String... additionalVMOpts) throws Throwable {
         List<String> finalOptions = new ArrayList<>();
         finalOptions.add(CommandLineOptionTest.getVMTypeOption());
+        String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated();
+        if (extraFlagForEmulated != null) {
+            finalOptions.add(extraFlagForEmulated);
+        }
         Collections.addAll(finalOptions, additionalVMOpts);
 
         CommandLineOptionTest.verifyOptionValue(optionName, expectedValue,
@@ -497,6 +505,18 @@
         throw new RuntimeException("Unknown VM mode.");
     }
 
+    /**
+     * @return addtional VMoptions(Emulated related) required to start a new VM with the same type as current.
+     */
+    private static String getVMTypeOptionForEmulated() {
+        if (Platform.isServer() && !Platform.isEmulatedClient()) {
+            return "-XX:-NeverActAsServerClassMachine";
+        } else if (Platform.isEmulatedClient()) {
+            return "-XX:+NeverActAsServerClassMachine";
+        }
+        return null;
+    }
+
     private final BooleanSupplier predicate;
 
     /**