Author: psrna
Date: 2012-10-03 18:51:56 -0400 (Wed, 03 Oct 2012)
New Revision: 44274
Modified:
trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy
Log:
Fixed iniFile initialization on Mac OSX and invalid thread access when invoking tests on
mac osx.
Modified: trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy
===================================================================
--- trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy 2012-10-03
19:58:50 UTC (rev 44273)
+++ trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy 2012-10-03
22:51:56 UTC (rev 44274)
@@ -35,12 +35,19 @@
String report = "TEST-install-" + new
SimpleDateFormat("yyyyMMddh-hmm").format(new Date()) + ".xml";
File output = File.createTempFile("install", ".txt");
output.deleteOnExit();
+
+ String specificVMArgs="";
+ String osName = System.properties['os.name'].toLowerCase();
+ if(osName.contains("mac")){
+ specificVMArgs="-XstartOnFirstThread";
+ }
// Invoke tests
Java proc = new org.apache.tools.ant.taskdefs.Java();
proc.setFork(true);
proc.setDir(eclipseHome);
proc.setOutput(output);
proc.setJvmargs(additionalVMArgs + " " +
+ specificVMArgs + " " +
"-Dorg.eclipse.swtbot.search.timeout=10000 " +
"-Dusage_reporting_enabled=false " +
"-Xms256M -Xmx768M -XX:MaxPermSize=512M");
@@ -114,8 +121,17 @@
proc.init();
int returnCode = proc.executeJava();
-
-File iniFile = eclipseHome.listFiles().find({it.getName().endsWith(".ini")});
+File iniFile;
+String osName = System.properties['os.name'].toLowerCase();
+if(osName.contains("mac")){
+ //Mac OSX
+ iniFile = new File(eclipseHome.getAbsolutePath() +
"/Eclipse.app/Contents/MacOS").listFiles().find({it.getName().endsWith(".ini")});
+ if(iniFile == null){
+ iniFile = new File(eclipseHome.getAbsolutePath() + "/JBoss Developer
Studio.app/Contents/MacOS").listFiles().find({it.getName().endsWith(".ini")});
+ }
+}else{
+ iniFile = eclipseHome.listFiles().find({it.getName().endsWith(".ini")});
+}
iniLines = iniFile.readLines();
targetIndex = iniLines.findIndexOf {line -> line.startsWith("-product") };
String productName = iniLines[targetIndex + 1];
Show replies by date