< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompilationWrapperTest.java

Print this page
rev 56282 : [mq]: graal

@@ -1,7 +1,7 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -22,10 +22,11 @@
  */
 
 
 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;
 
 import java.io.File;
 import java.io.IOException;

@@ -48,10 +49,17 @@
 /**
  * Tests support for dumping graphs and other info useful for debugging a compiler crash.
  */
 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.
      */
     @Test
     public void testVMCompilation1() throws IOException, InterruptedException {

@@ -150,14 +158,15 @@
      */
     @Test
     public void testTruffleCompilation1() throws IOException, InterruptedException {
         assumeManagementLibraryIsLoadable();
         testHelper(Collections.emptyList(),
+                        join(getPackageOpeningOptions(),
                         Arrays.asList(
                                         "-Dgraal.CompilationFailureAction=ExitVM",
                                         "-Dgraal.TrufflePerformanceWarningsAreFatal=true",
-                                        "-Dgraal.CrashAt=root test1"),
+                                                        "-Dgraal.CrashAt=root test1")),
                         "org.graalvm.compiler.truffle.test.SLTruffleGraalTestSuite", "test");
     }
 
     /**
      * Tests that TruffleCompilationExceptionsAreFatal works as expected.

@@ -166,14 +175,15 @@
     public void testTruffleCompilation2() throws IOException, InterruptedException {
         Probe[] probes = {
                         new Probe("Exiting VM due to TruffleCompilationExceptionsAreFatal=true", 1),
         };
         testHelper(Arrays.asList(probes),
+                        join(getPackageOpeningOptions(),
                         Arrays.asList(
                                         "-Dgraal.CompilationFailureAction=Silent",
                                         "-Dgraal.TruffleCompilationExceptionsAreFatal=true",
-                                        "-Dgraal.CrashAt=root test1"),
+                                                        "-Dgraal.CrashAt=root test1")),
                         "org.graalvm.compiler.truffle.test.SLTruffleGraalTestSuite", "test");
     }
 
     /**
      * Tests that TrufflePerformanceWarningsAreFatal generates diagnostic output.

@@ -183,14 +193,15 @@
         assumeManagementLibraryIsLoadable();
         Probe[] probes = {
                         new Probe("Exiting VM due to TrufflePerformanceWarningsAreFatal=true", 1),
         };
         testHelper(Arrays.asList(probes),
+                        join(getPackageOpeningOptions(),
                         Arrays.asList(
                                         "-Dgraal.CompilationFailureAction=Silent",
                                         "-Dgraal.TrufflePerformanceWarningsAreFatal=true",
-                                        "-Dgraal.CrashAt=root test1:PermanentBailout"),
+                                                        "-Dgraal.CrashAt=root test1:PermanentBailout")),
                         "org.graalvm.compiler.truffle.test.SLTruffleGraalTestSuite", "test");
     }
 
     private static final boolean VERBOSE = Boolean.getBoolean(CompilationWrapperTest.class.getSimpleName() + ".verbose");
 
< prev index next >