continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r574924 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SurefireReportAction.java
Date Wed, 12 Sep 2007 12:50:07 GMT
Author: evenisse
Date: Wed Sep 12 05:50:06 2007
New Revision: 574924

URL: http://svn.apache.org/viewvc?rev=574924&view=rev
Log:
Don't try to parse surefire reports directory if it doesn't exist

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SurefireReportAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SurefireReportAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SurefireReportAction.java?rev=574924&r1=574923&r2=574924&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SurefireReportAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SurefireReportAction.java
Wed Sep 12 05:50:06 2007
@@ -22,7 +22,6 @@
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.model.scm.TestResult;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.codehaus.plexus.util.DirectoryScanner;
 import org.codehaus.plexus.util.StringUtils;
@@ -83,7 +82,12 @@
 
         File reportsDirectory = getContinuum().getConfiguration().getTestReportsDirectory(
buildId, projectId );
 
-        parseReports( reportsDirectory );
+        testSuites = new ArrayList();
+
+        if ( reportsDirectory != null && reportsDirectory.exists() )
+        {
+            parseReports( reportsDirectory );
+        }
 
         getSummary( testSuites );
 
@@ -97,8 +101,6 @@
     {
         String[] xmlReportFiles = getIncludedFiles( reportsDirectory, "*.xml", "*.txt" );
 
-        testSuites = new ArrayList();
-
         for ( int index = 0; index < xmlReportFiles.length; index++ )
         {
             ReportTestSuite testSuite = new ReportTestSuite();
@@ -138,7 +140,7 @@
 
         for ( Iterator suites = suiteList.iterator(); suites.hasNext(); )
         {
-            
+
             ReportTestSuite suite = (ReportTestSuite) suites.next();
 
             totalTests += suite.getNumberOfTests();



Mime
View raw message