[PATCH] Enable jtreg tests to run on WSL (Windows Subsystem for Linux)

Andrew Luo andrewluotechnologies at outlook.com
Sun Jan 6 19:29:44 UTC 2019


We recently added support for building OpenJDK on WSL (targeting Windows; targeting Linux always worked).  However, running tests on WSL did not work, and we determined that some changes would be needed to jtreg to support this use case.  In particular, jtreg needs to know if it is running on WSL targeting Windows or WSL targeting Linux (when targeting Linux, no changes are needed as it is the same as any other Linux system, but when targeting Windows jtreg needs to run shell scripts in a special manner - in particular, calling "wsl.exe sh" instead of just "sh" since it's a Windows boot JDK, as well as translating environment variables using WSLENV...)

I've attached my patch with my proposed changes.  I welcome any thoughts/feedback.

(See https://bugs.openjdk.java.net/browse/JDK-8215445 for more details about supporting WSL for building OpenJDK)

Thanks,

-Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
URL: <https://mail.openjdk.java.net/pipermail/code-tools-dev/attachments/20190106/31e3b4d5/diff.txt>


More information about the code-tools-dev mailing list