changeset 51252:2aa21bb12059

8202559: Tests which start VM using JNI start failing after compile upgrade to VC 2017 Reviewed-by: erikj
author iignatyev
date Mon, 18 Jun 2018 16:58:16 -0700
parents 3300874b963c
children 3d5581c49005
files test/hotspot/jtreg/vmTestbase/ExecDriver.java
diffstat 1 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/vmTestbase/ExecDriver.java	Mon Jun 18 22:43:38 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/ExecDriver.java	Mon Jun 18 16:58:16 2018 -0700
@@ -102,22 +102,29 @@
         // adding jvm.so to library path
         if (launcher) {
             Path dir = Paths.get(Utils.TEST_JDK);
+            String value;
             String name;
             if (Platform.isWindows()) {
-                dir = dir.resolve("bin")
-                         .resolve(variant())
-                         .toAbsolutePath();
+                value = dir.resolve("bin")
+                           .resolve(variant())
+                           .toAbsolutePath()
+                           .toString();
+                value += File.pathSeparator;
+                value += dir.resolve("bin")
+                            .toAbsolutePath()
+                            .toString();
                 name = "PATH";
             } else {
-                dir = dir.resolve("lib")
-                         .resolve(variant())
-                         .toAbsolutePath();
+                value = dir.resolve("lib")
+                           .resolve(variant())
+                           .toAbsolutePath()
+                           .toString();
                 name = Platform.isOSX() ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH";
             }
 
             System.out.println("  with " + name + " = " +
                     pb.environment()
-                      .merge(name, dir.toString(), (x, y) -> y + File.pathSeparator + x));
+                      .merge(name, value, (x, y) -> y + File.pathSeparator + x));
             System.out.println("  with CLASSPATH = " +
                     pb.environment()
                       .put("CLASSPATH", Utils.TEST_CLASS_PATH));