maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r353865 - in /maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire: ForkedSurefireRunner.java SurefireBooter.java
Date Sun, 04 Dec 2005 15:41:17 GMT
Author: jvanzyl
Date: Sun Dec  4 07:41:15 2005
New Revision: 353865

URL: http://svn.apache.org/viewcvs?rev=353865&view=rev
Log:
o adding some more constants

Modified:
    maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/ForkedSurefireRunner.java
    maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java

Modified: maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/ForkedSurefireRunner.java
URL: http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/ForkedSurefireRunner.java?rev=353865&r1=353864&r2=353865&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/ForkedSurefireRunner.java
(original)
+++ maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/ForkedSurefireRunner.java
Sun Dec  4 07:41:15 2005
@@ -36,6 +36,8 @@
 
     public static String FORK_PERTEST = "pertest";
 
+    public static String FORK_NONE = "none";
+
     static int TESTS_SUCCEEDED = 0;
 
     static int TESTS_FAILED = 255;

Modified: maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
URL: http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java?rev=353865&r1=353864&r2=353865&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
(original)
+++ maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
Sun Dec  4 07:41:15 2005
@@ -43,6 +43,8 @@
 
     private static String BATTERY_EXECUTOR = "org.apache.maven.surefire.Surefire";
 
+    private static String SINGLE_TEST_BATTERY = "org.codehaus.surefire.battery.SingleTestBattery";
+
     private List batteries = new ArrayList();
 
     private List reports = new ArrayList();
@@ -107,15 +109,15 @@
     {
         boolean result = false;
 
-        if ( "once".equals( forkMode ) )
+        if ( forkMode.equals( ForkedSurefireRunner.FORK_NONE ) )
         {
-            result = runTestsForkOnce();
+            result = runTestsInProcess();
         }
-        else if ( "none".equals( forkMode ) )
+        else if ( forkMode.equals( ForkedSurefireRunner.FORK_ONCE ) )
         {
-            result = runTestsInProcess();
+            result = runTestsForkOnce();
         }
-        else if ( "pertest".equals( forkMode ) )
+        else if ( forkMode.equals( ForkedSurefireRunner.FORK_PERTEST ) )
         {
             result = runTestsForkEach();
         }
@@ -150,7 +152,7 @@
     {
         IsolatedClassLoader surefireClassLoader = createClassLoader();
 
-        Class batteryExecutorClass = surefireClassLoader.loadClass( "org.codehaus.surefire.Surefire"
);
+        Class batteryExecutorClass = surefireClassLoader.loadClass( BATTERY_EXECUTOR );
 
         Object batteryExecutor = batteryExecutorClass.newInstance();
 
@@ -333,7 +335,7 @@
 
         String reportClassNames = getListOfStringsAsString( reports, "," );
 
-        String batteryConfig = "org.codehaus.surefire.battery.SingleTestBattery|" + testClass;
+        String batteryConfig = SINGLE_TEST_BATTERY + "|" + testClass;
 
         String[] argArray =
             {
@@ -359,8 +361,7 @@
         classpathUrls.clear();
     }
 
-    private String getListOfStringsAsString( List listOfStrings,
-                                             String delimiterParm )
+    private String getListOfStringsAsString( List listOfStrings, String delimiterParm )
     {
         StringBuffer stringBuffer = new StringBuffer();
 



Mime
View raw message