RFR: 8215000: tools/launcher/JliLaunchTest.java fails on Windows
Brent Christian
brent.christian at oracle.com
Wed Dec 12 18:30:04 UTC 2018
Hi,
Shouldn't the lambdas be checking for v == null, rather than k == null?
-Brent
On 12/12/18 9:36 AM, Henry Jen wrote:
> Hi,
>
> Can I get a review of following patch?
>
> Looks like the assumption test jdk will be in PATH is simply not true, jtreg doesn’t do that.
> Also, this patch make sure the JDK to be tested is first in the search path.
>
> Cheers,
> Henry
>
>
> diff -r 241b8151b6b6 test/jdk/tools/launcher/JliLaunchTest.java
> --- a/test/jdk/tools/launcher/JliLaunchTest.java Fri Nov 30 13:42:49 2018 -0800
> +++ b/test/jdk/tools/launcher/JliLaunchTest.java Wed Dec 12 09:31:53 2018 -0800
> @@ -49,10 +49,12 @@
> Map<String, String> env = pb.environment();
> if (Platform.isWindows()) {
> // The DLL should be in JDK/bin
> + String libdir = Paths.get(Utils.TEST_JDK).resolve("bin").toAbsolutePath().toString();
> + env.compute("PATH", (k, v) -> (k == null) ? libdir : libdir + ";" + v);
> } else {
> String libdir = Paths.get(Utils.TEST_JDK).resolve("lib").toAbsolutePath().toString();
> String LD_LIBRARY_PATH = Platform.isOSX() ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH";
> - env.compute(LD_LIBRARY_PATH, (k, v) -> (k == null) ? libdir : v + ":" + libdir);
> + env.compute(LD_LIBRARY_PATH, (k, v) -> (k == null) ? libdir : libdir + ":" + v);
> }
>
> OutputAnalyzer outputf = new OutputAnalyzer(pb.start());
>
More information about the core-libs-dev
mailing list