RFR: Fix some issues building on Windows
Jorn Vernee via github.com
duke at openjdk.java.net
Thu Aug 22 11:00:16 UTC 2019
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
More information about the skara-dev
mailing list