RFR: Fix some issues building on Windows

Erik Duveblad via github.com duke at openjdk.java.net
Thu Aug 22 09:14:09 UTC 2019


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

This PR has been reviewed by Erik Duveblad via github.com - changes are approved. Review comment:

Patch looks good!

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


More information about the skara-dev mailing list