Author: alessio.soldano(a)jboss.com
Date: 2008-05-19 06:00:43 -0400 (Mon, 19 May 2008)
New Revision: 7090
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java
Log:
Fixing ProjectGeneratorTestCase regression
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java 2008-05-19
09:45:18 UTC (rev 7089)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/projectGenerator/ProjectGeneratorTestCase.java 2008-05-19
10:00:43 UTC (rev 7090)
@@ -36,6 +36,7 @@
import javax.xml.ws.Service;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
/**
* A test case for the user project generator:
@@ -75,9 +76,9 @@
}
File userPrjProp = new File(binDistroDir, "user-project.properties");
writeUserProjectProperties(userPrjProp);
- File distroBuild = new File(binDistroDir, "build.sh");
+ File distroBuild = new File(binDistroDir, "build.xml");
String integrationTarget =
System.getProperty("jbossws.integration.target");
- assertStatusCode(executeCommand(distroBuild.getCanonicalPath() + " -D" +
integrationTarget + ".home=" + jbossHome + "
-Djbossws.integration.target="
+ assertStatusCode(executeCommand("ant -f " + distroBuild.getAbsolutePath()
+ " -D" + integrationTarget + ".home=" + jbossHome + "
-Djbossws.integration.target="
+ integrationTarget + " create-project"), "Error while
creating the user project!");
File projectHomeDir = new File(workspaceHome, projectName);
File packageDir = new File(projectHomeDir.getCanonicalPath() +
"/src/main/java/org/jboss/test/ws/projectGenerator");
@@ -103,7 +104,7 @@
finally
{
assertStatusCode(executeCommand("ant -f " + projectBuild + "
undeploy"), "Error while undeploying the user project");
- assertStatusCode(executeCommand(distroBuild.getCanonicalPath() + "
delete-project"), "Error while deleting the user project");
+ assertStatusCode(executeCommand("ant -f " +
distroBuild.getCanonicalPath() + " delete-project"), "Error while deleting
the user project");
userPrjProp.delete();
}
}
@@ -195,14 +196,15 @@
private boolean isDistroTest() throws Exception
{
- File build = new File("../build.sh");
+ File build = new File("../build.xml");
if (!build.exists())
{
- build = new File("../../build.sh");
+ String testResDir = JBossWSTestHelper.getTestResourcesDir();
+ build = new File(testResDir.substring(0,
testResDir.lastIndexOf("modules")) + "build.xml");
}
if (!build.exists())
- throw new Exception("Unable to find build.sh!");
- Process p = executeCommand(build.getCanonicalPath() + " -p");
+ throw new Exception("Unable to find build.xml!");
+ Process p = executeCommand("ant -f " + build.getAbsolutePath() + "
-p");
p.waitFor();
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
Show replies by date