geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r502254 - in /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS: Controller.groovy report/ReportGenerator.groovy
Date Thu, 01 Feb 2007 16:02:05 GMT
Author: jdillon
Date: Thu Feb  1 08:02:04 2007
New Revision: 502254

URL: http://svn.apache.org/viewvc?view=rev&rev=502254
Log:
Zip up results
Some testing to support impl of the new report generation

Added:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
  (with props)
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=502254&r1=502253&r2=502254
==============================================================================
--- 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
Thu Feb  1 08:02:04 2007
@@ -28,6 +28,8 @@
 
 import gbuild.system.util.IterationConfigurator
 
+import gbuild.config.projects.Geronimo_CTS.report.ReportGenerator
+
 /**
  * ???
  */
@@ -253,11 +255,14 @@
         }
         
         //
-        // TODO: May want to zip up reports, soon report will cover everything
-        //       so the input can be zipped up to prevent horrible artifact UI display
-        //       when we actually need to view a file
+        // HACK: Make a zip and put it under the workflowId, will remove others
+        //       shortly, but currently need it for compat until new reporting is done
         //
         
+        ant.zip(destfile: "reports/tck/$workflowId/runtests-results-${iteration}.zip") {
+            zipfileset(dir: targetDir, includes='**')
+        }
+        
         separator()
     }
     
@@ -324,5 +329,27 @@
         //
         
         maven.execute(args)
+    }
+    
+    def testing = {
+        /*
+        def workflowId = params.require('anthill.workflow.id')
+        def webcontainer = params.require('webcontainer')
+        
+        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)
+        */
+        
+        //
+        // TODO: Setup the input directory, unpack test results
+        //
+        
+        def generator = new ReportGenerator()
+        generator.generate()
     }
 }

Added: 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=auto&rev=502254
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
(added)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
Thu Feb  1 08:02:04 2007
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// $Id$
+//
+
+package gbuild.config.projects.Geronimo_CTS.report
+
+import gbuild.system.LogSupport
+import gbuild.system.util.LazyProxy
+
+import org.apache.velocity.Template
+import org.apache.velocity.VelocityContext
+import org.apache.velocity.app.Velocity
+import org.apache.velocity.app.VelocityEngine
+
+import org.apache.commons.lang.time.StopWatch
+
+class ReportGenerator extends LogSupport
+{
+    def generate() {
+        def passing = new File('/Users/jason/Downloads/Client_compat12EntityCmpTest1.jtr')
+        
+        def failing = new File('/Users/jason/Downloads/MDBClient_test1.jtr')
+        
+        // Curry the filename so we don't loose it due to scoping rules
+        def factory = { new TestResult(it) }.curry(failing)
+        def result = new LazyProxy(factory)
+        
+        println result.checksum
+        
+        /*
+        // simple memory usage test (LazyProxy wins... ya)
+        def list = []
+        while (true) {
+            def failing = new File('/Users/jason/Downloads/MDBClient_test1.jtr')
+            
+            // def result = new TestResult(failing)
+            
+            // Curry the filename so we don't loose it due to scoping rules
+            def factory = { new TestResult(it) }.curry(failing)
+            def result = new LazyProxy(factory)
+            
+            failing = false
+            
+            println result.checksum
+            
+            list << result
+            
+            println list.size()
+        }
+        */
+        
+        //
+        // TODO: Load all .jtr files, NOTE: Might not be able to load each .jtr
+        //       all at once, it might blow up the heap... so need to keep that in mind
+        //
+        //       May need to create a LazyTestResult, which onlys knows about the
+        //       file name, then when accessed it loads itself, proxy will use
+        //       soft ref to allow instance to be reclaimed
+        //
+        
+        //
+        // TODO: Organize by iteration, but also show package summary?  Forget about sections...
+        //
+        
+        //
+        // TODO: Include links to server logs and complete javatest logs (even though
+        //       we have each tests output in the report)
+        //
+        
+        VelocityEngine velocity = new VelocityEngine()
+        VelocityContext context = new VelocityContext()
+    }
+}
+

Propchange: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/ReportGenerator.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message