Author: alessio.soldano(a)jboss.com
Date: 2008-05-13 10:22:33 -0400 (Tue, 13 May 2008)
New Revision: 7020
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
Log:
Fixing smoke tools regression
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2008-05-13
14:22:11 UTC (rev 7019)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2008-05-13
14:22:33 UTC (rev 7020)
@@ -45,8 +45,9 @@
private String ENDPOINT_CLASS =
"org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
private String JBOSS_HOME;
- private String JDK_HOME;
- private String TEST_EXEC_DIR;
+ private String JAVA_HOME;
+ private String CLASSES_DIR;
+ private String TEST_DIR;
private String OS;
protected void setUp() throws Exception
@@ -54,8 +55,9 @@
super.setUp();
JBOSS_HOME = System.getProperty("jboss.home");
- TEST_EXEC_DIR = new File(".").getCanonicalPath();
- JDK_HOME = System.getProperty("jdk.home");
+ CLASSES_DIR = System.getProperty("test.classes.directory");
+ TEST_DIR = createResourceFile("..").getAbsolutePath();
+ JAVA_HOME = System.getProperty("java.home");
OS = System.getProperty("os.name").toLowerCase();
}
@@ -68,7 +70,7 @@
// use absolute path for the output to be re-usable
String absWsdlLoc = getResourceFile(WSDL_LOCATION).getAbsolutePath();
- String absOutput = new File("wsconsume/java").getAbsolutePath();
+ String absOutput = new File(TEST_DIR,
"wsconsume/java").getAbsolutePath();
String command = JBOSS_HOME + "/bin/wsconsume.sh -k -o " + absOutput +
" " + absWsdlLoc;
Process p = executeCommand(command);
@@ -76,7 +78,7 @@
// check status code
assertStatusCode(p, "wsconsume");
- File javaSource = new
File("wsconsume/java/org/openuri/_2004/_04/helloworld/EndpointInterface.java");
+ File javaSource = new File(TEST_DIR,
"wsconsume/java/org/openuri/_2004/_04/helloworld/EndpointInterface.java");
assertTrue("Service endpoint interface not generated",
javaSource.exists());
}
@@ -88,16 +90,15 @@
fail("This test has not been verified on windows");
}
- String absOutput = new File("wsprovide/java/").getAbsolutePath();
+ String absOutput = new File(TEST_DIR,
"wsprovide/java/").getAbsolutePath();
- String command = JBOSS_HOME + "/bin/wsprovide.sh -k -w -o " + absOutput +
" --classpath " + TEST_EXEC_DIR + "/test-classes " + ENDPOINT_CLASS;
+ String command = JBOSS_HOME + "/bin/wsprovide.sh -k -w -o " + absOutput +
" --classpath " + CLASSES_DIR + " " + ENDPOINT_CLASS;
Process p = executeCommand(command);
// check status code
assertStatusCode(p, "wsprovide");
- File outputDir = new File("wsprovide/java");
- File javaSource = new File(outputDir.getAbsolutePath() +
"/org/jboss/test/ws/jaxws/smoke/tools/jaxws/AddResponse.java");
+ File javaSource = new File(TEST_DIR,
"wsprovide/java/org/jboss/test/ws/jaxws/smoke/tools/jaxws/AddResponse.java");
assertTrue("Response wrapper not generated", javaSource.exists());
}
@@ -106,9 +107,8 @@
{
// be verbose
System.out.println("cmd: " + command);
- System.out.println("test execution dir: " + TEST_EXEC_DIR);
- Process p = Runtime.getRuntime().exec(command, new String[] {
"JBOSS_HOME=" + JBOSS_HOME, "JAVA_HOME=" + JDK_HOME });
+ Process p = Runtime.getRuntime().exec(command, new String[] {
"JBOSS_HOME=" + JBOSS_HOME, "JAVA_HOME=" + JAVA_HOME });
return p;
}
Show replies by date