Ticket #16010: v2-0015-unit-test-headlessness-allow-this-to-be-set-throu.patch

File v2-0015-unit-test-headlessness-allow-this-to-be-set-throu.patch, 2.5 KB (added by ris, 11 months ago)
  • .travis.yml

    From 33585a5d300e0f48fc2e28ab4f469a39b2783872 Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Tue, 27 Mar 2018 20:30:46 +0100
    Subject: [PATCH v2 15/28] unit test headlessness: allow this to be set through
     an ant property
    
    update .travis.yml to use this to provide headless and non-headless builds
    ---
     .travis.yml | 26 ++++++++++++++------------
     build.xml   |  3 ++-
     2 files changed, 16 insertions(+), 13 deletions(-)
    
    diff --git a/.travis.yml b/.travis.yml
    index d897c5458..68aa23018 100644
    a b  
    11language: java
    2 os:
    3   - linux
    4   - osx
     2script: (eval "$ANT_INVOCATION $(test $TRAVIS_JDK_VERSION = openjdk8 && echo -DnoJavaFX=true) test")
     3os: linux
     4dist: trusty
     5env:
     6  - ANT_INVOCATION="xvfb-run ant -Dtest.headless=false"
     7  - ANT_INVOCATION="ant -Dtest.headless=true"
     8jdk:
     9  - oraclejdk9
     10  - oraclejdk8
     11  - openjdk8
    512matrix:
    613  include:
    7     - os: linux
    8       dist: trusty
    9       sudo: required
    10       jdk:
    11         - oraclejdk9
    12         - oraclejdk8
    13         - openjdk8
    14     - os: osx
    15       osx_image: xcode9.2
     14  - os: osx
     15    osx_image: xcode9.2
     16    jdk: ~
     17    env: ANT_INVOCATION="ant -Dtest.headless=true"
    1618before_install:
    1719  - >
    1820    case "${TRAVIS_OS_NAME:-linux}" in
  • build.xml

    diff --git a/build.xml b/build.xml
    index 53dbe6e89..da49d59f2 100644
    a b  
    4242        <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
    4343        <property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
    4444        <property name="java.lang.version" value="1.8" />
     45        <property name="test.headless" value="true" />
    4546        <property name="jacoco.includes" value="org.openstreetmap.josm.*" />
    4647        <property name="jacoco.inclbootstrapclasses" value="false" />
    4748        <property name="jacoco.inclnolocationclasses" value="false" />
    Build-Date: ${build.tstamp} 
    525526                    <jvmarg value="java.desktop/java.awt=ALL-UNNAMED" if:set="isJava9" />
    526527                    <sysproperty key="josm.home" value="${test.dir}/config/@{testfamily}-josm.home"/>
    527528                    <sysproperty key="josm.test.data" value="${test.dir}/data"/>
    528                     <sysproperty key="java.awt.headless" value="true"/>
     529                    <sysproperty key="java.awt.headless" value="${test.headless}"/>
    529530                    <sysproperty key="glass.platform" value="Monocle"/>
    530531                    <sysproperty key="monocle.platform" value="Headless"/>
    531532                    <sysproperty key="prism.order" value="sw"/>