[jboss-cvs] JBossAS SVN: r60173 - branches/JBoss_4_0_5_GA_CP/test/src/main/org/jboss/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 1 21:53:21 EST 2007


Author: scott.stark at jboss.org
Date: 2007-02-01 21:53:21 -0500 (Thu, 01 Feb 2007)
New Revision: 60173

Modified:
   branches/JBoss_4_0_5_GA_CP/test/src/main/org/jboss/test/JBossTestCase.java
Log:
Update logging initialization to work when build.testlog is not defined

Modified: branches/JBoss_4_0_5_GA_CP/test/src/main/org/jboss/test/JBossTestCase.java
===================================================================
--- branches/JBoss_4_0_5_GA_CP/test/src/main/org/jboss/test/JBossTestCase.java	2007-02-02 01:22:39 UTC (rev 60172)
+++ branches/JBoss_4_0_5_GA_CP/test/src/main/org/jboss/test/JBossTestCase.java	2007-02-02 02:53:21 UTC (rev 60173)
@@ -73,6 +73,30 @@
    public JBossTestCase(String name)
    {
       super(name);
+      /* Validate the build.testlog system property and set it it to the
+       * location of the log resource
+       */
+      String testlog = System.getProperty("build.testlog");
+      if( testlog == null )
+      {
+         // Try to set it to the log resource location
+         try
+         {
+            testlog = getResourceURL("log");
+            if( testlog != null )
+            {
+               System.setProperty("build.testlog", testlog);
+            }
+            else
+            {
+               // Default to cwd output/log
+               System.setProperty("build.testlog", "output/log");
+            }
+         }
+         catch(Exception ignore)
+         {
+         }
+      }
       log = Logger.getLogger(getClass());
       initDelegate();
    }




More information about the jboss-cvs-commits mailing list