diff --git a/appveyor.yml b/appveyor.yml index e928a53a0..e38fda457 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ build_script: - gradlew.bat --no-daemon assemble checkstyleMain checkstyleTest test_script: - - gradlew.bat --no-daemon headless allTests + - gradlew.bat --no-daemon headless test environment: JAVA_HOME: C:\Program Files\Java\jdk9 # Use 64-bit Java diff --git a/build.gradle b/build.gradle index a3636f538..e2dc4a3fe 100644 --- a/build.gradle +++ b/build.gradle @@ -132,6 +132,24 @@ test { } } + +task headless { + doLast { + println 'Setting headless mode properties.' + test { + systemProperties = [ + 'testfx.robot': 'glass', + 'testfx.headless': 'true', + 'prism.order': 'sw', + 'prism.text': 't2k', + ] + } + } +} + +// Makes sure that headless properties are set before running tests +test.mustRunAfter headless + asciidoctor { backends 'html5' sourceDir 'docs' @@ -169,4 +187,4 @@ task copyStylesheets(type: Copy) { } asciidoctor.dependsOn copyStylesheets -defaultTasks 'clean', 'test', 'asciidoctor', 'checkstyleMain', 'checkstyleTest' +defaultTasks 'clean', 'headless', 'test', 'asciidoctor', 'checkstyleMain', 'checkstyleTest'