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

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Jan 7 15:27:26 UTC 2019


Andrew,

I'll take a look at this in detail later today.

-- Jon

On 1/6/19 9:02 PM, Andrew Luo wrote:
> Adding jtreg-dev.  Didn't realize that there was such a mailing list until later (the jtreg code lives under code-tools repository)
>
> Thanks,
>
> -Andrew
>
> -----Original Message-----
> From: code-tools-dev <code-tools-dev-bounces at openjdk.java.net> On Behalf Of Andrew Luo
> Sent: Sunday, January 6, 2019 11:30 AM
> To: code-tools-dev at openjdk.java.net
> Subject: [PATCH] Enable jtreg tests to run on WSL (Windows Subsystem for Linux)
>
> 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


More information about the code-tools-dev mailing list