geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r502144 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
Date Thu, 01 Feb 2007 07:32:54 GMT
Author: jdillon
Date: Wed Jan 31 23:32:53 2007
New Revision: 502144

URL: http://svn.apache.org/viewvc?view=rev&rev=502144
Log:
Added impl for collectResults and generateReport actions

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.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=502144&r1=502143&r2=502144
==============================================================================
--- 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
Wed Jan 31 23:32:53 2007
@@ -28,6 +28,8 @@
 
 import gbuild.system.util.IterationConfigurator
 
+import java.util.UUID
+
 /**
  * ???
  */
@@ -129,13 +131,13 @@
         }
         
         // Collect the repository
-        ant.mkdir(dir: "${targetDir}/repository")
+        ant.mkdir(dir: "$targetDir/repository")
         
         // Determine the set of artifacts based on the workflow since this will differer
from version to version :-(
         switch (params.require('anthill.workflow')) {
             case 'build 1.2':
-                ant.copy(todir: "${targetDir}/repository") {
-                    fileset(dir: "${sourceDir}/repository") {
+                ant.copy(todir: "$targetDir/repository") {
+                    fileset(dir: "$sourceDir/repository") {
                         include(name: 'activeio/**')
                         include(name: 'ant/**')
                         include(name: 'axis/**')
@@ -206,9 +208,9 @@
         }
         
         // Collect the project
-        ant.mkdir(dir: "${targetDir}/project")
-        ant.copy(todir: "${targetDir}/project") {
-            fileset(dir: "${sourceDir}/project") {
+        ant.mkdir(dir: "$targetDir/project")
+        ant.copy(todir: "$targetDir/project") {
+            fileset(dir: "$sourceDir/project") {
                 include(name: '*')
                 include(name: 'tck-testsuite/**')
                 
@@ -219,10 +221,73 @@
     }
     
     def collectResults = {
-        // TODO
+        def workflowId = params.require('anthill.workflow.id')
+        def iteration = params.require('iteration')
+        
+        //
+        // TODO: Include webcontainer too?
+        //
+        
+        def sourceDir = new File('project/tck-testsuite/target').canonicalFile
+        log.info "Source dir: $sourceDir"
+        
+        def targetDir = new File("reports/tck/$workflowId/$iteration").canonicalFile
+        log.info "Target dir: $targetDir"
+        
+        ant.mkdir(dir: targetDir)
+        
+        // Copy test output to be saved/remoted
+        ant.copy(todir: targetDir) {
+            fileset(dir: sourceDir) {
+                include(name: 'logs/**')
+                include(name: 'summary.properties')
+                
+                //
+                // TODO: Shall we also include the javatest output too?
+                //
+            }
+        }
     }
     
     def generateReport = {
-        // TODO
+        def workflowId = params.require('anthill.workflow.id')
+        
+        def sections = new File('project/tck-testsuite/sections.properties').canonicalFile
+        log.info "Using sections from: $sections"
+        
+        def inputDir = new File("reports/tck/$workflowId").canonicalFile
+        log.info "Input dir: $inputDir"
+        assert inputDir.exists()
+        
+        def reportDir = new File('reports/tck/html').canonicalFile
+        log.info "Generating reports into: $reportDir"
+        ant.mkdir(dir: reportDir)
+        
+        // Copy all summary properties to a tempdir for soaking up
+        def summariesDir = new File('temp/summaries').canonicalFile
+        ant.mkdir(dir: summariesDir)
+        
+        def scanner = ant.fileScanner {
+            fileset(dir: inputDir) {
+                include(name: '*/summary.properties')
+            }
+        }
+        for (file in scanner) {
+             def uuid = UUID.randomUUID()
+             ant.copy(file: file, tofile: "$summariesDir/$uuid.properties")
+        }
+        
+        // Invoke maven to generate the report
+        def maven = new MavenCommand(context)
+        maven.pom = 'project/tck-testsuite/pom.xml'
+        
+        def args = []
+        args << 'j2eetck:generate-report'
+        args << "-DsectionsFile=$sections"
+        args << "-DsummariesDirectory=$summariesDir"
+        args << "-DreportsDirectory=ignored"
+        args << "-DoutputDirectory=$reportDir"
+        
+        maven.execute(args)
     }
 }



Mime
View raw message