changeset 8024:bace5fdce0fe

[test-only] RT-38575: Java FX 8u40 build got stuck because hdiutil is hanging when it receives a message "will sleep received" Summary: Only run DMG tests when explicitly requested Reviewed-By: kcr
author shemnon
date Tue, 09 Sep 2014 18:46:35 -0600
parents 2d34d02b27af
children 351df31aa086
files build.gradle gradle.properties.template modules/fxpackager/src/test/java/com/oracle/tools/packager/mac/MacDmgBundlerTest.java
diffstat 3 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Tue Sep 09 16:16:05 2014 -0700
+++ b/build.gradle	Tue Sep 09 18:46:35 2014 -0600
@@ -331,6 +331,11 @@
 defineProperty("RETAIN_PACKAGER_TESTS", "false")
 ext.IS_RETAIN_PACKAGER_TESTS = Boolean.parseBoolean(RETAIN_PACKAGER_TESTS)
 
+// TEST_PACKAGER_DMG whether tests that create DMG files via hdiutil
+// should be run.  On OSX 10.7 this tends to hang automated builds
+defineProperty("TEST_PACKAGER_DMG", "false")
+ext.IS_TEST_PACKAGER_DMG = Boolean.parseBoolean(TEST_PACKAGER_DMG)
+
 // Define the SWT.jar that we are going to have to download during the build process based
 // on what platform we are compiling from (not based on our target).
 ext.SWT_FILE_NAME = IS_MAC ? "org.eclipse.swt.cocoa.macosx.x86_64_3.7.2.v3740f" :
@@ -2043,6 +2048,7 @@
     test {
         dependsOn packagerFXPackagedJar
         systemProperty "RETAIN_PACKAGER_TESTS", RETAIN_PACKAGER_TESTS
+        systemProperty "TEST_PACKAGER_DMG", TEST_PACKAGER_DMG
         systemProperty "FULL_TEST", FULL_TEST
     }
 }
--- a/gradle.properties.template	Tue Sep 09 16:16:05 2014 -0700
+++ b/gradle.properties.template	Tue Sep 09 18:46:35 2014 -0600
@@ -98,6 +98,12 @@
 
 #RETAIN_PACKAGER_TESTS = false
 
+# Specifies whether or not Packager DMG tests should be run.
+# Mac OSX 10.7 tends to hang on automated builds with hdiutil is run,
+# hence the default is false.
+
+#TEST_PACKAGER_DMG = false
+
 # Specify the COMPILE_TARGETS when performing cross compiles. A Cross-Compile is
 # when you build for a platform other than the one you are building on. For example,
 # to build for Apple iOS, you would specify ios as one of the COMPILE_TARGETS.
--- a/modules/fxpackager/src/test/java/com/oracle/tools/packager/mac/MacDmgBundlerTest.java	Tue Sep 09 16:16:05 2014 -0700
+++ b/modules/fxpackager/src/test/java/com/oracle/tools/packager/mac/MacDmgBundlerTest.java	Tue Sep 09 18:46:35 2014 -0600
@@ -73,6 +73,9 @@
     public static void prepareApp() {
         // only run on mac
         Assume.assumeTrue(System.getProperty("os.name").toLowerCase().contains("os x"));
+        
+        // only run if explicitly requested
+        Assume.assumeTrue(Boolean.parseBoolean(System.getProperty("TEST_PACKAGER_DMG")));
 
         runtimeJdk = System.getenv("PACKAGER_JDK_ROOT");