geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r531358 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
Date Mon, 23 Apr 2007 07:18:29 GMT
Author: jdillon
Date: Mon Apr 23 00:18:28 2007
New Revision: 531358

URL: http://svn.apache.org/viewvc?view=rev&rev=531358
Log:
Only attempt to process .jtr files if the directory exists

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy?view=diff&rev=531358&r1=531357&r2=531358
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
Mon Apr 23 00:18:28 2007
@@ -192,23 +192,31 @@
             
             // Scan for result files
             def resultsDir = new File(workDir, 'javatest')
-            def scanner = ant.fileScanner {
-            fileset(dir: resultsDir) {
-                    include(name: '**/*.jtr')
-                }
-            }
             
-            // Process each result
-            log.info 'Rendering testcases'
-            scanner.each { file ->
-                def testCase = TestCase.fromFile(resultsDir, file)
-                def model = iterModel << testCase
+            //
+            // NOTE: If for some reason the tests failed to execute, we won't have
+            //       any results, so don't try to process them.
+            //
+            
+            if (resultsDir.exists()) {
+                def scanner = ant.fileScanner {
+                fileset(dir: resultsDir) {
+                        include(name: '**/*.jtr')
+                    }
+                }
                 
-                // Render testcase detail
-                def renderer = createRenderer('testcase-detail.vm', model.href)
-                renderer.params.testCase = testCase
-                renderer.params.model = model
-                renderer.render()
+                // Process each result
+                log.info 'Rendering testcases'
+                scanner.each { file ->
+                    def testCase = TestCase.fromFile(resultsDir, file)
+                    def model = iterModel << testCase
+                    
+                    // Render testcase detail
+                    def renderer = createRenderer('testcase-detail.vm', model.href)
+                    renderer.params.testCase = testCase
+                    renderer.params.model = model
+                    renderer.render()
+                }
             }
             
             log.info 'Rendering class summaries'



Mime
View raw message