src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HsErrLogTest.java
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HsErrLogTest.java Thu Oct 17 20:27:44 2019 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HsErrLogTest.java Thu Oct 17 20:53:35 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -39,6 +39,7 @@
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.core.test.GraalCompilerTest;
+import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.compiler.test.SubprocessUtil;
import org.graalvm.compiler.test.SubprocessUtil.Subprocess;
import org.junit.Assert;
@@ -54,8 +55,10 @@
@Test
public void test1() throws IOException, InterruptedException {
List<String> args = new ArrayList<>();
- if (Java8OrEarlier) {
+ if (JavaVersionUtil.JAVA_SPEC <= 8) {
args.add("-XX:-UseJVMCIClassLoader");
+ } else {
+ args.add("--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.api.directives=ALL-UNNAMED");
}
args.add("-XX:+UseJVMCICompiler");
args.add("-XX:CompileOnly=" + Crasher.class.getName() + "::tryCrash");
@@ -89,7 +92,7 @@
}
}
- Assert.fail("Could not find " + re.pattern());
+ Assert.fail(String.format("Could not find %s%n%s", re.pattern(), proc));
}
private static void checkHsErr(File hsErrPath) {