diff --git a/mozilla/java/dist/netbeans/build.xml b/mozilla/java/dist/netbeans/build.xml index a26f5fa150a..bcb087d9cdb 100755 --- a/mozilla/java/dist/netbeans/build.xml +++ b/mozilla/java/dist/netbeans/build.xml @@ -210,7 +210,7 @@ ${so.prefix}xul.${so.extension}. - + diff --git a/mozilla/java/webclient/build-tests.xml b/mozilla/java/webclient/build-tests.xml index 1be602dfecf..0f99c85213b 100644 --- a/mozilla/java/webclient/build-tests.xml +++ b/mozilla/java/webclient/build-tests.xml @@ -160,6 +160,7 @@ + diff --git a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java index bc32c1af556..4c397d95287 100644 --- a/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java +++ b/mozilla/java/webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java @@ -1,5 +1,5 @@ /* - * $Id: WebclientTestCase.java,v 1.13 2007-02-21 01:40:44 edburns%acm.org Exp $ + * $Id: WebclientTestCase.java,v 1.14 2007-02-23 14:38:55 edburns%acm.org Exp $ */ /* @@ -47,7 +47,7 @@ import org.mozilla.util.THTTPD; * * Lifetime And Scope

* - * @version $Id: WebclientTestCase.java,v 1.13 2007-02-21 01:40:44 edburns%acm.org Exp $ + * @version $Id: WebclientTestCase.java,v 1.14 2007-02-23 14:38:55 edburns%acm.org Exp $ * * @see Blah * @see Bloo @@ -62,7 +62,7 @@ public abstract class WebclientTestCase extends TestCase public static final String WEBCLIENTSTUB_LOG_MODULE = "webclientstub"; public static final String WEBCLIENT_LOG_MODULE = "webclient"; -public static String OUTPUT_FILE_ROOT = "build.test/"; +public static String OUTPUT_FILE_ROOT = null; public static final String TEST_LOG = "org.mozilla.webclient.test"; public static final String TEST_LOG_STRINGS = "org.mozilla.webclient.TestLogStrings"; @@ -112,22 +112,8 @@ public static Logger getLogger( String loggerName ) { public void setUp() { verifyPreconditions(); + verifyOutputFileRootIsSet(); - // Set the OUTPUT_FILE_ROOT - String mozSrcValue = null; - File outputRoot = null; - - if (null != (mozSrcValue = System.getProperty("MOZ_SRC"))) { - OUTPUT_FILE_ROOT = mozSrcValue + File.separator + - "mozilla" + File.separator + "java" + File.separator + - "webclient" + File.separator + OUTPUT_FILE_ROOT; - } - else { - assertTrue(null != (OUTPUT_FILE_ROOT = System.getProperty("build.test.results.dir"))); - } - outputRoot = new File(OUTPUT_FILE_ROOT); - assertTrue(outputRoot.exists()); - LOGGER.info(this.getClass().getName() + " setUp()"); } @@ -142,12 +128,12 @@ public void tearDown() // public static TestSuite createServerTestSuite() { + verifyOutputFileRootIsSet(); TestSuite result = new TestSuite() { public void run(TestResult result) { serverThread = new THTTPD.ServerThread("LocalHTTPD", - new File (getBrowserBinDir() + - "/../../../java/webclient/build.test"), -1); + new File (OUTPUT_FILE_ROOT), -1); serverThread.start(); serverThread.P(); super.run(result); @@ -219,6 +205,19 @@ protected String verifyOutputFileIsSet() } +private static void verifyOutputFileRootIsSet() { + if (null != OUTPUT_FILE_ROOT) { + return; + } + OUTPUT_FILE_ROOT = System.getProperty("build.test.results.dir"); + assertNotNull(OUTPUT_FILE_ROOT); + + File outputRoot = new File(OUTPUT_FILE_ROOT); + assertTrue(outputRoot.exists()); + + +} + /** * This implementation checks that the proper environment vars are set.