Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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.

https://github.com/openstreetmap/josm/pull/37

Attachments (1)

v1-0001-travis-build-against-jdk-10-and-11-requiring-a-bu.patch (1.6 KB ) - added by ris 6 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 by Don-vip, 6 years ago

Milestone: 18.10

comment:2 by Don-vip, 6 years ago

Resolution: fixed
Status: newclosed

In 14307/josm:

fix #16819 - travis: build against jdk 10 and 11 (patch by ris)

comment:3 by Don-vip, 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

comment:4 by ris, 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:5 by Don-vip, 6 years ago

In 14308/josm:

see #16819 - should fix KeyboardUtilsTest on macOS

in reply to:  4 comment:6 by Don-vip, 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 Don-vip, 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:8 by Don-vip, 6 years ago

In 14309/josm:

see #16819 - log more information when running junit tests on Travis

comment:9 by ris, 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:10 by Don-vip, 6 years ago

In 14312/josm:

see #16819 - Travis: display output of failed tests only to avoid exceeding the maximum log length

comment:11 by Don-vip, 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 ris, 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 Don-vip, 6 years ago

Indeed system:about is reserved for macOS. We should try another action.

comment:14 by Don-vip, 6 years ago

In 14313/josm:

see #16819 - use another action to make test pass on macOS

comment:15 by Don-vip, 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 ris, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.