Author: psrna
Date: 2012-10-09 17:24:50 -0400 (Tue, 09 Oct 2012)
New Revision: 44387
Modified:
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy
Log:
Added support for installing selected IUs in testInstall.groovy
Modified:
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-10-09
19:13:10 UTC (rev 44386)
+++
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-10-09
21:24:50 UTC (rev 44387)
@@ -87,7 +87,7 @@
if(selectedIUs != null){
//select IUs to install
for(String iu : selectedIUs.split(",")){
- assertFalse("IU: \"" + iu + "\" NOT FOUND!",
!checkIU(iu));
+ assertFalse("Unit: \"" + iu + "\" NOT FOUND!",
!checkIU(iu));
}
} else {
Modified: trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy
===================================================================
--- trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy 2012-10-09
19:13:10 UTC (rev 44386)
+++ trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy 2012-10-09
21:24:50 UTC (rev 44387)
@@ -2,6 +2,7 @@
import java.text.SimpleDateFormat;
void usage() {
+ println
"-------------------------------------------------------------";
println "Script to test installation";
println "usage: groovy.sh testInstall.groovy <eclipse_home>
<file_containing_list_of_sites|repository_url|CHECK_FOR_UPDATES>*";
println " <eclipse_home>: an eclipse installation will be performed
on";
@@ -9,11 +10,15 @@
println " separated by spaces or line
breaks";
println " <repository_url>: URL of a p2 repo to install from";
println " CHECK_FOR_UPDATES: will trigger the check for updates";
+ println
"--------------------------------------------------------------";
+ println "usage for installing selected units: groovy.sh -DIUs=\"comma
separated list of features\" testInstall.groovy <eclipse_home>
<repository_url>";
+ println
"--------------------------------------------------------------";
}
// Takes a repo or a directory.xml URL single parameter
void installUrl(String repoUrl, File eclipseHome, String product) {
+
if (repoUrl.endsWith(".xml")) {
installFromCentral(repoUrl, eclipseHome, product);
} else if (repoUrl.equals("CHECK_FOR_UPDATES")) {
@@ -28,6 +33,12 @@
void installRepo(String repoUrl, File eclipseHome, String productName) {
println("Installing content from " + repoUrl);
String additionalVMArgs = "-DUPDATE_SITE=" + repoUrl;
+
+ String ius = System.properties['IUs'];
+ if(ius != null){
+ println("Units to install:" + ius);
+ additionalVMArgs += " -DIUs=\"" + ius + "\"";
+ }
runSWTBotInstallRoutine(eclipseHome, productName, additionalVMArgs,
"org.jboss.tools.tests.installation.InstallTest");
}
@@ -82,9 +93,10 @@
// Takes a Central directory.xml URL single parameter
void installFromCentral(String discoveryUrl, File eclipseHome, String productName) {
- println("Installing content from " + discoveryUrl);
- String report = "TEST-install-" + new
SimpleDateFormat("yyyyMMddh-hmm").format(new Date()) + ".xml";
- runSWTBotInstallRoutine(eclipseHome, productName,
"-Djboss.discovery.directory.url=" + discoveryUrl,
"org.jboss.tools.tests.installation.InstallFromCentralTest");
+ println("Installing content from " + discoveryUrl);
+ String additionalVMArgs = "-Djboss.discovery.directory.url=" +
discoveryUrl;
+
+ runSWTBotInstallRoutine(eclipseHome, productName, additionalVMArgs,
"org.jboss.tools.tests.installation.InstallFromCentralTest");
}
// Check for updates
@@ -105,6 +117,13 @@
System.exit(2);
}
+if(System.properties['IUs'] && (args.length != 2)){
+ println("Installing selected/filtered Units is supported only from one
repository_url!");
+ usage();
+ System.exit(2);
+}
+
+
println "Preparing tests, installing framework";
// Install test framework
Show replies by date