equal
deleted
inserted
replaced
59 } |
59 } |
60 if (!path.toFile().exists()) { |
60 if (!path.toFile().exists()) { |
61 throw new Error("TESTBUG: the library has not been found in " + nativePath); |
61 throw new Error("TESTBUG: the library has not been found in " + nativePath); |
62 } |
62 } |
63 path = path.resolve("gtestLauncher" + (Platform.isWindows() ? ".exe" : "")); |
63 path = path.resolve("gtestLauncher" + (Platform.isWindows() ? ".exe" : "")); |
64 Stream<String> launcherArgs = Stream.of(path.toString(), "-jdk", |
64 ProcessTools.executeCommand(new String[] { |
65 System.getProperty("test.jdk")); |
65 path.toString(), |
66 // JVM accepts only -X and -D flags |
66 "-jdk", |
67 Stream<String> vmFLags = Arrays.stream(Utils.getTestJavaOpts()) |
67 System.getProperty("test.jdk") |
68 .filter(s -> s.startsWith("-X") || s.startsWith("-D")); |
68 }).shouldHaveExitValue(0); |
69 String[] cmds = Stream.concat(launcherArgs, vmFLags) |
|
70 .toArray(String[]::new); |
|
71 ProcessTools.executeCommand(cmds).shouldHaveExitValue(0); |
|
72 } |
69 } |
73 |
70 |
74 private static String getJVMVariantSubDir() { |
71 private static String getJVMVariantSubDir() { |
75 if (Platform.isServer()) { |
72 if (Platform.isServer()) { |
76 return "server"; |
73 return "server"; |