changeset 9549:396ef46b3445

8148489: conditional execution of unstable tests Reviewed-by: kcr
author ddhill
date Fri, 29 Jan 2016 13:04:56 -0500
parents 7a777bc7d68f
children 7cae930f7a19
files build.gradle gradle.properties.template tests/system/src/test/java/test/renderlock/RenderLock1Test.java
diffstat 3 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Thu Jan 28 11:54:43 2016 -0800
+++ b/build.gradle	Fri Jan 29 13:04:56 2016 -0500
@@ -392,6 +392,12 @@
 defineProperty("AWT_TEST", "true")
 ext.IS_AWT_TEST = Boolean.parseBoolean(AWT_TEST);
 
+// Specifies whether to run unstable tests (true) - tests that don't run well with Hudson builds
+// These tests should be protected with :
+//    assumeTrue(Boolean.getBoolean("unstable.test"));
+defineProperty("UNSTABLE_TEST", "false")
+ext.IS_UNSTABLE_TEST = Boolean.parseBoolean(UNSTABLE_TEST);
+
 // Specify the build configuration (Release, Debug, or DebugNative)
 defineProperty("CONF", "Debug")
 ext.IS_DEBUG_JAVA = CONF == "Debug" || CONF == "DebugNative"
@@ -1245,6 +1251,8 @@
             systemProperty 'com.sun.javafx.gestures.rotate', 'true'
             systemProperty 'com.sun.javafx.gestures.scroll', 'true'
         }
+
+        systemProperty 'unstable.test', IS_UNSTABLE_TEST
     }
 
     compileTestJava {
--- a/gradle.properties.template	Thu Jan 28 11:54:43 2016 -0800
+++ b/gradle.properties.template	Fri Jan 29 13:04:56 2016 -0500
@@ -88,6 +88,10 @@
 
 #USE_ROBOT = true
 
+# Specifies whether to run unstable tests, that are not suitable for automated builds
+
+#UNSTABLE_TEST = false
+
 # Specifies whether to run system tests that depend on AWT.
 # This flag is ignored if FULL_TEST is false.
 
--- a/tests/system/src/test/java/test/renderlock/RenderLock1Test.java	Thu Jan 28 11:54:43 2016 -0800
+++ b/tests/system/src/test/java/test/renderlock/RenderLock1Test.java	Fri Jan 29 13:04:56 2016 -0500
@@ -25,11 +25,13 @@
 
 package test.renderlock;
 
+import static org.junit.Assume.assumeTrue;
 import org.junit.Test;
 
 public class RenderLock1Test extends RenderLockCommon {
     @Test
     public void windowCloseTest() throws Exception {
+        assumeTrue(Boolean.getBoolean("unstable.test"));
         doWindowCloseTest();
     }
 }