./build.gradle
Print this page
rev 6157 : RT-35443 Provide a headless glass implementation integrated with our JUnit tests
@@ -336,10 +336,14 @@
// Specifies whether to run robot-based visual tests (only used when FULL_TEST is also enabled)
defineProperty("USE_ROBOT", "true")
ext.IS_USE_ROBOT = Boolean.parseBoolean(USE_ROBOT);
+// Specified whether to run tests in headless mode
+defineProperty("HEADLESS_TEST", "false")
+ext.IS_HEADLESS_TEST = Boolean.parseBoolean(HEADLESS_TEST);
+
// Specifies whether to run system tests that depend on AWT (only used when FULL_TEST is also enabled)
defineProperty("AWT_TEST", "true")
ext.IS_AWT_TEST = Boolean.parseBoolean(AWT_TEST);
// Specify the build configuration (Release, Debug, or DebugNative)
@@ -1037,10 +1041,15 @@
include("**/*Test.*");
if (BUILD_CLOSED && DO_JCOV) {
addJCov(project, test)
}
classpath = files("$jfxrtJar") + classpath
+ if (IS_HEADLESS_TEST) {
+ systemProperty 'glass.platform', 'Monocle'
+ systemProperty 'monocle.platform', 'Headless'
+ systemProperty 'prism.order', 'sw'
+ }
}
compileTestJava {
classpath = files("$jfxrtJar") + classpath
}