geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r504409 - in /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild: config/projects/Geronimo_CTS/Controller.groovy config/projects/Geronimo_CTS/report/ReportGenerator.groovy system/util/Template.groovy
Date Wed, 07 Feb 2007 01:53:54 GMT
Author: jdillon
Date: Tue Feb  6 17:53:53 2007
New Revision: 504409

URL: http://svn.apache.org/viewvc?view=rev&rev=504409
Log:
Changed default logging to be less verbose
Added a few stopwatches to time things

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

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy?view=diff&rev=504409&r1=504408&r2=504409
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
Tue Feb  6 17:53:53 2007
@@ -27,9 +27,12 @@
 import gbuild.system.commands.ExecCommand
 
 import gbuild.system.util.IterationConfigurator
+import gbuild.system.util.Sorting
 
 import gbuild.config.projects.Geronimo_CTS.report.ReportGenerator
 
+import org.apache.commons.lang.time.StopWatch
+
 /**
  * ???
  */
@@ -296,17 +299,27 @@
         }
         
         def archives = []
+        files.each { file ->
+            archives << file
+        }
         
         log.info 'Result archives:'
-        files.each { file ->
+        archives = archives.sort()
+        archives.each { file ->
             log.info "    $file"
-            archives << file
         }
         
+        def watch = new StopWatch()
+        watch.start()
+        
+        log.info 'Generating report'
+        
         separator()
         
         new ReportGenerator(archives, targetDir).generate()
         
         separator()
+        
+        log.info "Report generated in $watch"
     }
 }

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=504409&r1=504408&r2=504409
==============================================================================
--- 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
Tue Feb  6 17:53:53 2007
@@ -119,12 +119,16 @@
         archives.each { archive ->
             log.info "Processing results archive: $archive"
             
+            def watch = new StopWatch()
+            watch.start()
+            
             // Unpack the results
             ant.unzip(src: archive, dest: workDir)
             
             // Load runtests.properties, so we can see webcontainer and iteration (and others)
             def props = loadProperties("$workDir/runtests.properties")
             def iteration = props.iteration
+            log.info "Iteration: $iteration"
             
             // Load the testuite
             def testSuite = loadTestSuite(workDir)
@@ -133,18 +137,17 @@
             def stats = new StatsCollector()
             
             def renderTestCase = { testCase ->
-                log.info "Processing testcase: $testCase.name"
+                log.debug "Rendering testcase: $testCase.name"
                 
                 def template = engine.getTemplate('testcase-detail.tmpl')
                 template.params.testCase = testCase
                 
                 def file = new File(targetDir, makeSafeFilename(testCase.className) + '/'
+ testCase.testName + '.html')
-                ant.mkdir(dir: file.parentFile)
-                
                 template.render(file)
             }
             
             // Render testcase details
+            log.info 'Rendering testcases'
             testSuite.testCases.each { name, testCase ->
                 stats << testCase
                 
@@ -152,8 +155,9 @@
             }
             
             // Render package summaries
+            log.info 'Rendering package summaries'
             stats.classesInPackages.each { packageName, classNames ->
-                log.info "Processing package summary: $packageName"
+                log.debug "Rendering package summary: $packageName"
                 
                 def template = engine.getTemplate('package-summary.tmpl')
                 template.params.packageName = packageName
@@ -161,14 +165,13 @@
                 template.params.stats = stats
                 
                 def file = new File(targetDir, makeSafeFilename(packageName) + '/index.html')
-                ant.mkdir(dir: file.parentFile)
-                
                 template.render(file)
             }
             
             // Render class summaries
+            log.info 'Rendering class summaries'
             stats.testsInClasses.each { className, testNames ->
-                log.info "Processing class summary: $className"
+                log.debug "Rendering class summary: $className"
                 
                 def template = engine.getTemplate('class-summary.tmpl')
                 template.params.className = className
@@ -176,31 +179,27 @@
                 template.params.stats = stats
                 
                 def file = new File(targetDir, makeSafeFilename(className) + '/index.html')
-                ant.mkdir(dir: file.parentFile)
-                
                 template.render(file)
             }
             
             def renderIterationSummary = {
-                log.info "Rendering iteration summary: $iteration"
+                log.info 'Rendering iteration summary'
                 def template = engine.getTemplate('iteration-detail.tmpl')
                 template.params.stats = stats
                 template.params.props = props
                 template.params.iteration = iteration
                 
                 def file = new File(targetDir, "iteration-${iteration}.html")
-                ant.mkdir(dir: file.parentFile)
                 template.render(file)
             }
             
             def renderIterationPackagesFrame = {
-                log.info "Rendering iteration packages frame: $iteration"
+                log.info 'Rendering iteration packages frame'
                 def template = engine.getTemplate('iteration-packages-frame.tmpl')
                 template.params.stats = stats
                 template.params.iteration = iteration
                 
                 def file = new File(targetDir, "iteration-${iteration}-packages-frame.html")
-                ant.mkdir(dir: file.parentFile)
                 template.render(file)
             }
             
@@ -213,7 +212,9 @@
             
             // Clean up
             log.info "Cleaning up"
-            ant.delete(dir: workDir)
+            ant.delete(dir: workDir, quiet: true)
+            
+            log.info "Finished processing iteration $iteration in $watch"
         }
         
         def renderIterationOverview = {

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy?view=diff&rev=504409&r1=504408&r2=504409
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
Tue Feb  6 17:53:53 2007
@@ -66,7 +66,12 @@
     
     void render(File file) {
         assert file
-        assert file.parentFile.exists()
+        
+        //
+        // NOTE: Not using ant here to avoid evil log message
+        //
+        file.parentFile.mkdirs()
+        assert file.parentFile.exists() : "Failed to create directory: ${file.parentFile}"
         
         // Fail if we are overriting something
         assert !file.exists()



Mime
View raw message