--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompilationWrapperTest.java Tue Sep 24 08:54:08 2019 -0700
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompilationWrapperTest.java Tue Sep 24 12:47:15 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
package org.graalvm.compiler.hotspot.test;
+import static org.graalvm.compiler.test.SubprocessUtil.getPackageOpeningOptions;
import static org.graalvm.compiler.test.SubprocessUtil.getVMCommandLine;
import static org.graalvm.compiler.test.SubprocessUtil.withoutDebuggerArguments;
@@ -50,6 +51,13 @@
*/
public class CompilationWrapperTest extends GraalCompilerTest {
+ private static List<String> join(List<String> l1, List<String> l2) {
+ ArrayList<String> result = new ArrayList<>(l1.size() + l2.size());
+ result.addAll(l1);
+ result.addAll(l2);
+ return result;
+ }
+
/**
* Tests compilation requested by the VM.
*/
@@ -152,10 +160,11 @@
public void testTruffleCompilation1() throws IOException, InterruptedException {
assumeManagementLibraryIsLoadable();
testHelper(Collections.emptyList(),
- Arrays.asList(
- "-Dgraal.CompilationFailureAction=ExitVM",
- "-Dgraal.TrufflePerformanceWarningsAreFatal=true",
- "-Dgraal.CrashAt=root test1"),
+ join(getPackageOpeningOptions(),
+ Arrays.asList(
+ "-Dgraal.CompilationFailureAction=ExitVM",
+ "-Dgraal.TrufflePerformanceWarningsAreFatal=true",
+ "-Dgraal.CrashAt=root test1")),
"org.graalvm.compiler.truffle.test.SLTruffleGraalTestSuite", "test");
}
@@ -168,10 +177,11 @@
new Probe("Exiting VM due to TruffleCompilationExceptionsAreFatal=true", 1),
};
testHelper(Arrays.asList(probes),
- Arrays.asList(
- "-Dgraal.CompilationFailureAction=Silent",
- "-Dgraal.TruffleCompilationExceptionsAreFatal=true",
- "-Dgraal.CrashAt=root test1"),
+ join(getPackageOpeningOptions(),
+ Arrays.asList(
+ "-Dgraal.CompilationFailureAction=Silent",
+ "-Dgraal.TruffleCompilationExceptionsAreFatal=true",
+ "-Dgraal.CrashAt=root test1")),
"org.graalvm.compiler.truffle.test.SLTruffleGraalTestSuite", "test");
}
@@ -185,10 +195,11 @@
new Probe("Exiting VM due to TrufflePerformanceWarningsAreFatal=true", 1),
};
testHelper(Arrays.asList(probes),
- Arrays.asList(
- "-Dgraal.CompilationFailureAction=Silent",
- "-Dgraal.TrufflePerformanceWarningsAreFatal=true",
- "-Dgraal.CrashAt=root test1:PermanentBailout"),
+ join(getPackageOpeningOptions(),
+ Arrays.asList(
+ "-Dgraal.CompilationFailureAction=Silent",
+ "-Dgraal.TrufflePerformanceWarningsAreFatal=true",
+ "-Dgraal.CrashAt=root test1:PermanentBailout")),
"org.graalvm.compiler.truffle.test.SLTruffleGraalTestSuite", "test");
}