This commit is contained in:
Jesper Wilhelmsson 2017-02-12 04:49:38 +01:00
commit 0886de86a4
2 changed files with 21 additions and 1 deletions

View File

@ -5170,7 +5170,7 @@ VS_SDK_PLATFORM_NAME_2013=
#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
###############################################################################
#

View File

@ -199,6 +199,10 @@ public abstract class CommandLineOptionTest {
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 @@ public abstract class CommandLineOptionTest {
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 @@ public abstract class CommandLineOptionTest {
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;
/**