RFR: Fix some issues building on Windows

Christian Stein via github.com duke at openjdk.java.net
Thu Aug 22 11:35:05 UTC 2019


On Thu, 22 Aug 2019 11:31:35 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:

> On Thu, 22 Aug 2019 11:27:47 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:
> 
>> On Thu, 22 Aug 2019 11:16:24 GMT, Christian Stein via github.com <duke at openjdk.java.net> wrote:
>> 
>>> On Thu, 22 Aug 2019 11:00:16 GMT, Jorn Vernee via github.com <duke at openjdk.java.net> wrote:
>>> 
>>>> On Thu, 22 Aug 2019 09:13:48 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:
>>>> 
>>>>> On Thu, 22 Aug 2019 04:45:26 GMT, Christian Stein via github.com <duke at openjdk.java.net> wrote:
>>>>> 
>>>>>> Building skara on Windows requires at least following changes:
>>>>>> 
>>>>>> - `build.gradle`: enforce UTF-8 as source code encoding
>>>>>> - `BotRunnerConfigurationTests.java`: make assertion file separator agnostic
>>>>>> - `ProcessTests.java`: disable test class on Windows, all tests call tools that are not present by default on Windows
>>>>>> 
>>>>>> After applying those changes, there're two more issues with building on Windows:
>>>>>> 
>>>>>> - `VersionPlugin.java`:  there's an `IOException` raised, which I _handled_ by setting the version property to `"unknown"`, around line 55:
>>>>>> ```
>>>>>>         } catch (IOException e) {
>>>>>>             // throw new GradleException("could not read output from 'git rev-parse'", e);
>>>>>>             project.setProperty("version", "unknown");
>>>>>>         }
>>>>>> ```
>>>>>> - All tests that use `VCS.HG`, e.g. `JCheckTests#checksForCommit(VCS.HG)`, fail with:
>>>>>> `java.io.UncheckedIOException: java.io.IOException: Num headers (1) differ from num hunks (0)` which might(!) be related to a) how `git.exe`/`hg.exe` are invoked and/or b) due to `UnixStreamReader` only interpreting `\n` as a new line character ... or c) something completely different.
>>>>>> 
>>>>>> ----------------
>>>>>> 
>>>>>> Commits:
>>>>>>  - 7ffabbbf:	Fix some tests running on Windows
>>>>>> 			- build.gradle: enforce UTF-8 as source code encoding
>>>>>> 			- BotRunnerConfigurationTests.java: make assertion file separator agnostic
>>>>>> 			- ProcessTests.java: disable test class on Windows, all tests call tools
>>>>>> 			that are not present by default on Windows
>>>>>> 
>>>>>> Pull request:
>>>>>> https://git.openjdk.java.net/skara/pull/63
>>>>>> 
>>>>>> Webrev:
>>>>>> https://webrevs.openjdk.java.net/skara/63/webrev.00
>>>>>> 
>>>>>> Patch:
>>>>>> https://git.openjdk.java.net/skara/pull/63.diff
>>>>>> 
>>>>>> Fetch command:
>>>>>> git fetch https://git.openjdk.java.net/skara pull/63/head:pull/63
>>>>> 
>>>>> Thanks @sormuras for contributing! I know @jornvernee has been doing some work on getting the tests to pass on Windows as well, thank you for helping out in this area (me and @rwestberg use Linux and macOS).
>>>>> 
>>>>> PR: https://git.openjdk.java.net/skara/pull/63
>>>> 
>>>> @sormuras  I'm guessing you're also on HG version 5? I'm seeing the same failure on your last point, due to HG changing the internal API, and one of the extensions no longer working.
>>>> 
>>>> PR: https://git.openjdk.java.net/skara/pull/63
>>> 
>>> That's correct:
>>> ```
>>> C:\Users\Sor>hg --version
>>> Mercurial Distributed SCM (version 5.0.2)
>>> ```
>>> I may downgrade to ... [`4.7.x`](https://bitbucket.org/tortoisehg/files/downloads/), if that helps.
>>> 
>>> PR: https://git.openjdk.java.net/skara/pull/63
>> 
>> @sormuras I think Jorn already has a patch to get it working with 5.0.2, just hold on a little longer, no need to downgrade
>> 
>> PR: https://git.openjdk.java.net/skara/pull/63
> 
> I also took the patch for a spin on my Linux x86_64 machine, all tests pass with `sh gradlew test` :+1:
> 
> PR: https://git.openjdk.java.net/skara/pull/63

_off-topic_ Locally, I managed to upgrade Skara to JUnit `5.5.1` -- PR is in the making.

PR: https://git.openjdk.java.net/skara/pull/63


More information about the skara-dev mailing list