RFR: Windows again...

Christian Stein via github.com duke at openjdk.java.net
Mon Aug 26 18:52:18 UTC 2019


### Two more Windows issues down

- **Skip BrideBot tests on Windows**
The `Exporter` class, used `JBridgeBot`, calls application `"rsync"`, which isn't available on Windows per default. Therefore, the annotation `@DisabledOnOS(OS.WINDOWS)` is attached to the entire test class.
Due to `@BeforeAll void setup()` (and `teardown()`) being called anyway, a second gatekeeper in form an assumption is added to this method as well. This improves the execution duration time of all disabled tests.

- **Convert relative folder path to be URI-friendly**
On Windows Path::toString generates back slashes as path element separators. This yields invalid URI paths: like `"%s\webrev.%s"`.

### Open ends

Current show stopper on Windows is:

```java.io.UncheckedIOException: java.io.IOException: Unexpected exit code
'git commit --message=Added webrev' exited with status: 1
[stdout]
> HEAD detached at b6bb82c
> nothing to commit, working tree clean
[stderr]
	at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.WebrevStorage.createAndArchive(WebrevStorage.java:90)
	at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.ArchiveWorkItem.run(ArchiveWorkItem.java:595)
	at org.openjdk.skara.test/org.openjdk.skara.test.TestBotRunner.runPeriodicItems(TestBotRunner.java:34)
	at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.MailingListBridgeBotTests.skipAddingExistingWebrev(MailingListBridgeBotTests.java:800)

..

Caused by: java.io.IOException: Unexpected exit code
'git commit --message=Added webrev' exited with status: 1
[stdout]
> HEAD detached at b6bb82c
> nothing to commit, working tree clean
[stderr]
	at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitRepository.await(GitRepository.java:94)
	at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitRepository.commit(GitRepository.java:556)
	at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitRepository.commit(GitRepository.java:521)
	at org.openjdk.skara.vcs/org.openjdk.skara.vcs.git.GitRepository.commit(GitRepository.java:516)
	at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.WebrevStorage.push(WebrevStorage.java:60)
	at org.openjdk.skara.bots.mlbridge/org.openjdk.skara.bots.mlbridge.WebrevStorage.createAndArchive(WebrevStorage.java:86)
```

----------------

Commits:
 - 91ea9193:	Convert relative folder path to be URI-friendly
			On Windows Path::toString generates back slashes as path element
			separators. This yields invalid URI paths: like "%s\webrev.%s".
 - 7bc47b57:	Skip BridgeBot tests on Windows
			The Exporter class, used JBridgeBot, calls application "rsync", which
			isn't available on Windows per default. Therefore, the annotation
			`@DisabledOnOS(OS.WINDOWS)` is attached to the entire test class.
			Due to `@BeforeAll void setup()` (and teardown()) being called anyway,
			a second gatekeeper in form an assumption is added to this method as
			well. This improves the execution duration time of all disabled tests.

Pull request:
https://git.openjdk.java.net/skara/pull/86

Webrev:
https://webrevs.openjdk.java.net/skara/86/webrev.00

Patch:
https://git.openjdk.java.net/skara/pull/86.diff

Fetch command:
git fetch https://git.openjdk.java.net/skara pull/86/head:pull/86


More information about the skara-dev mailing list