RFR: Fix some issues building on Windows

Christian Stein via github.com duke at openjdk.java.net
Thu Aug 22 04:45:26 UTC 2019


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


More information about the skara-dev mailing list