geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r502840 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
Date Sat, 03 Feb 2007 01:48:45 GMT
Author: jdillon
Date: Fri Feb  2 17:48:45 2007
New Revision: 502840

URL: http://svn.apache.org/viewvc?view=rev&rev=502840
Log:
Move stuff around a little
Generating target/runtest.properties with the full params we used, will need this later when
generating the report

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=502840&r1=502839&r2=502840
==============================================================================
--- 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
Fri Feb  2 17:48:45 2007
@@ -35,6 +35,13 @@
  */
 class Controller extends gbuild.system.ProjectController
 {
+    //
+    // TODO: Need to add a way to provide custom initalization for controllers
+    //       so we can easily setup commonly used variables.
+    //
+    //       Might simply override init() ?
+    //
+    
     def build = {
         def maven = new MavenCommand(context)
         
@@ -56,54 +63,6 @@
         maven.execute()
     }
     
-    def runtests = {
-        def exec = new ExecCommand(context)
-        exec.executable = 'project/tck-testsuite/runtests'
-        
-        def args = []
-        args << '--nocolor'
-        
-        args << '-w'
-        args << params.require('webcontainer')
-        
-        def repoDir = new File('repository').canonicalFile
-        args << "-Dmaven.repo.local=$repoDir"
-        
-        //
-        // NOTE: Once library support is hooked up, we can probably avoid this
-        //       (and the builk repo collection too) by running gproxy
-        //       with a cache dir which is shared between builds
-        //
-        
-        // If offline is not set or it set but not true, then run offline
-        if (params.offline == null || !params.offline) {
-            args << '--offline'
-        }
-        
-        // Append some extra arguments for 2.0 runtests to generate summary reports
-        switch (params.require('anthill.workflow')) {
-            case 'build 2.0':
-                args << '--summary'
-                break
-        }
-        
-        args << params.require('tests')
-        
-        exec.execute(args)
-    }
-    
-    def runtestsIteration = {
-        params.tests = '%'
-        
-        def cfg = new IterationConfigurator(context)
-        cfg.configFile = 'project/tck-testsuite/iteration.conf'
-        cfg.iteration = params.iteration
-        cfg.applyTo = [ 'tests' ]
-        cfg.apply()
-        
-        runtests()
-    }
-    
     def primeTestsuite = {
         params.webcontainer = 'jetty'
         params.tests = 'nosuchtest'
@@ -224,7 +183,72 @@
         separator()
     }
     
+    def runtests = {
+        def exec = new ExecCommand(context)
+        exec.executable = 'project/tck-testsuite/runtests'
+        
+        def args = []
+        args << '--nocolor'
+        
+        args << '-w'
+        args << params.require('webcontainer')
+        
+        def repoDir = new File('repository').canonicalFile
+        args << "-Dmaven.repo.local=$repoDir"
+        
+        //
+        // NOTE: Once library support is hooked up, we can probably avoid this
+        //       (and the builk repo collection too) by running gproxy
+        //       with a cache dir which is shared between builds
+        //
+        
+        // If offline is not set or it set but not true, then run offline
+        if (params.offline == null || !params.offline) {
+            args << '--offline'
+        }
+        
+        // Append some extra arguments for 2.0 runtests to generate summary reports
+        switch (params.require('anthill.workflow')) {
+            case 'build 2.0':
+                args << '--summary'
+                break
+        }
+        
+        args << params.require('tests')
+        
+        // Before we execute, save the parameters used to execute runtests
+        def targetDir = new File('target').canonicalFile
+        ant.mkdir(dir: targetDir)
+        params.store("$targetDir/runtests.properties")
+        
+        exec.execute(args)
+    }
+    
+    def runtestsIteration = {
+        params.tests = '%'
+        
+        def cfg = new IterationConfigurator(context)
+        cfg.configFile = 'project/tck-testsuite/iteration.conf'
+        cfg.iteration = params.iteration
+        cfg.applyTo = [ 'tests' ]
+        cfg.apply()
+        
+        //
+        // TODO: May want to include extra deals from the conf, like
+        //       a header/title for the iteration, so we can use
+        //       that when generating reports
+        //
+        //       Need to change config to xml before we do this though...
+        //
+        
+        runtests()
+    }
+    
     def collectResults = {
+        //
+        // TODO: use target/results for dir to be sucked up by AH
+        //
+        
         def workflowId = params.require('anthill.workflow.id')
         def iteration = params.require('iteration')
         def webcontainer = params.require('webcontainer')
@@ -296,6 +320,12 @@
     }
     
     def testing = {
+        def resultsDir = new File('target/results').canonicalFile
+        ant.mkdir(dir: resultsDir)
+        
+        params.store("$resultsDir/runtests.properties")
+        params.store("$resultsDir/runtests.xml", true)
+        
         /*
         def workflowId = params.require('anthill.workflow.id')
         def webcontainer = params.require('webcontainer')



Mime
View raw message