#16819 closed enhancement (fixed)
[PATCH] travis: build against jdk 10 and 11
Reported by: | ris | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 18.10 |
Component: | Unit tests | Version: | |
Keywords: | travis tests ant java9 java10 java11 | Cc: |
Description
This requires bumping ant versions - the ant supplied by travis on trusty doesn't recognize java >8. fetching
it "manually" is ugly but does allow us to unify ant installation across OSs.
I've removed jdk9 as it seems like overkill now, but I've left in the headless=false
builds because I still have some naive hope that people will be able to battle against them and get them passing. Or perhaps I'm looking at that wrong and what I should be doing is simply accepting that many tests were not designed to work with non-headless mode and set them to skip. This way at least we'd be able to catch regressions from just a glance at the build's success or failure.
As for the macos build - it's just failing on one test related to keyboard shortcuts - ideally I'd like someone more familiar with macos and the keyboard shortcut system to go in and fix it but all I can do is wish.
Attachments (1)
Change History (17)
by , 6 years ago
Attachment: | v1-0001-travis-build-against-jdk-10-and-11-requiring-a-bu.patch added |
---|
comment:1 by , 6 years ago
Milestone: | → 18.10 |
---|
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 6 years ago
How do we get details about test failures on Travis? I only see the following:
[junit] Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 20.638 sec [junit] TEST org.openstreetmap.josm.gui.MainApplicationTest FAILED [junit] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.193 sec [junit] TEST org.openstreetmap.josm.tools.KeyboardUtilsTest FAILED
follow-up: 6 comment:4 by , 6 years ago
Unless we have e.g. an S3 bucket to point it at, we don't unfortunately.
(It doesn't necessarily have to be S3, it could any random place we could e.g. scp
the results to, but we'd have to cobble together our own uploading steps and means of hiding the credentials)
comment:6 by , 6 years ago
Replying to ris:
(It doesn't necessarily have to be S3, it could any random place we could e.g.
scp
the results to, but we'd have to cobble together our own uploading steps and means of hiding the credentials)
It's overkill, I'll find another way :)
comment:7 by , 6 years ago
How does the travis.yml works? I don't understand why ANT_INVOCATION
is defined three times:
env: - ANT_INVOCATION="xvfb-run ant -Dtest.headless=false" - ANT_INVOCATION="ant -Dtest.headless=true" ... env: ANT_INVOCATION="ant -Dtest.headless=true"
If I want to add an additional parameter, do I need to add it three times?
comment:9 by , 6 years ago
Specifying it twice causes it to be enumerated across the matrix of tested environments - it will evaluate each environment for each setting of that variable.
It then sets it a single time for the macos run (because it can't do non-headless on travis afaik)
I *think* if you set a particular variable a single time it doesn't do any multiplication magic and only leaves it set to that value for all executions.
p.s. there is a system in travis for being able to set "encrypted" credentials but I haven't looked into it too hard.
comment:11 by , 6 years ago
It works :) Here's the macOS error:
Testcase: testGetRegisteredActionShortcut took 1.285 sec FAILED expected:<org.openstreetmap.josm.actions.AboutAction@706e52f3> but was:<null> junit.framework.AssertionFailedError: expected:<org.openstreetmap.josm.actions.AboutAction@706e52f3> but was:<null> at org.openstreetmap.josm.gui.MainApplicationTest.testGetRegisteredActionShortcut(MainApplicationTest.java:297) at org.openstreetmap.josm.testutils.JOSMTestRules$TimeoutThread.run(JOSMTestRules.java:700)
comment:12 by , 6 years ago
Yeah last time I dug into this that's about the conclusion I came to and indeed if you look further it looks like the shortcut isn't being registered for that action, but I didn't know whether this is just an "expected" platform difference, what may be causing this, how long this test has been failing on macos...?
comment:13 by , 6 years ago
Indeed system:about
is reserved for macOS. We should try another action.
comment:15 by , 6 years ago
OK, macOS build fixed. Only non-headless builds are failing now. With 29 failed tests only, I think this is worth the effort :)
comment:16 by , 6 years ago
That does sound very tempting. I was about to start writing more plugin tests, but it would be good to nail the non-headless ones.
In 14307/josm: