geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r506064 - in /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report: ./ model/ resources/
Date Sun, 11 Feb 2007 16:32:02 GMT
Author: jdillon
Date: Sun Feb 11 08:32:01 2007
New Revision: 506064

URL: http://svn.apache.org/viewvc?view=rev&rev=506064
Log:
More clean up and some optimizations

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/PageRenderer.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/config/projects/Geronimo_CTS/report/model/ClassModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/FactoryGroupModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/GroupModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/PackageModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/SuiteModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-detail.vm
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-log.vm
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/macros.vm
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/overview-summary.vm

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/PageRenderer.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/PageRenderer.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/PageRenderer.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/PageRenderer.groovy
Sun Feb 11 08:32:01 2007
@@ -26,7 +26,8 @@
 import gbuild.system.template.Template
 
 /**
- * ???
+ * Encapsulates page rendering, including any helper functions available
+ * to the template.
  */
 class PageRenderer
 {
@@ -71,7 +72,10 @@
     private static final long MEGABYTES = KILOBYTES * 1024
     
     String logFileSize(filename) {
+        assert filename
+        
         def file = new File("${params.workDir}/logs/$filename")
+        assert file.exists()
         
         long size = file.length() / MEGABYTES
         if (size > 0) {

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=506064&r1=506063&r2=506064
==============================================================================
--- 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
Sun Feb 11 08:32:01 2007
@@ -153,7 +153,9 @@
         // Render an interation log
         def renderIterationLog = { model, logFile ->
             logFile = new File("$logFile")
-            def file = "${logFile.name}-${model.iterationIndex}.html"
+            assert logFile.exists()
+            
+            def file = "logs/${logFile.name}-${model.iterationIndex}.html"
             def renderer = createRenderer('iteration-log.vm', file)
             renderer.params.model = model
             renderer.params.logFile = logFile
@@ -225,11 +227,19 @@
             
             log.info 'Rendering iteration logs'
             renderIterationLog(iterModel, "${workDir}/logs/server.log")
+            
+            //
+            // NOTE: These files get big, so might need to split them up by test or something
+            //       Since the names don't really match can't include on the testcase detail
+            //       But, could provide an index and render each test's logs to a file
+            //
             renderIterationLog(iterModel, "${workDir}/logs/javatest.log")
             
             // Clean up for the next iteration
             ant.delete(dir: workDir)
         }
+        
+        logMemoryUsage()
         
         log.info "Rendering overview bits"
         renderWithSuite('iteration-overview.vm', "iteration-overview.html")

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/ClassModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/ClassModel.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/ClassModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/ClassModel.groovy
Sun Feb 11 08:32:01 2007
@@ -51,10 +51,6 @@
         return children.values().sort()
     }
     
-    long getTestCount() {
-        return tests.size()
-    }
-    
     String getPackageName() {
         return name.substring(0, name.lastIndexOf('.'))
     }

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/FactoryGroupModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/FactoryGroupModel.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/FactoryGroupModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/FactoryGroupModel.groovy
Sun Feb 11 08:32:01 2007
@@ -71,9 +71,7 @@
     protected TestModel createModel(TestCase testCase) {
         assert testCase
         
-        def name = testCase[childName]
-        
-        return addChild(name, childType.newInstance(name))
+        return addChild(childType.newInstance(testCase[childName]))
     }
 }
 

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/GroupModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/GroupModel.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/GroupModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/GroupModel.groovy
Sun Feb 11 08:32:01 2007
@@ -42,13 +42,13 @@
         super(name)
     }
     
-    protected TestModel addChild(String name, TestModel model) {
+    protected TestModel addChild(TestModel model) {
         assert model
         
         // Make sure we don't clobber anything
-        assert !children.containsKey(name)
+        assert !children.containsKey(model.name)
         
-        children[name] = model
+        children[model.name] = model
         
         // Register ourselves for our childrens events
         model << this
@@ -72,10 +72,6 @@
     
     long time = 0
     
-    String toString() {
-        return "passed=${passCount}, failed=${failureCount}, errors=${errorCount}, duration=${duration}"
-    }
-    
     def testCaseAdded(TestCase testCase) {
         if (testCase.status.passed) {
             passCount++
@@ -108,6 +104,13 @@
     
     double getSuccessRate() {
         return passCount * 100 / count
+    }
+    
+    /**
+     * Added to help render barGraph
+     */
+    int getSuccessRateAsInteger() {
+        return successRate.toInteger()
     }
     
     String getStatusIcon() {

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/IterationModel.groovy
Sun Feb 11 08:32:01 2007
@@ -85,10 +85,6 @@
         return children.values().sort()
     }
     
-    long getPacakgeCount() {
-        return packages.size()
-    }
-    
     Collection getClasses() {
         def list = []
         
@@ -99,10 +95,6 @@
         return list.sort()
     }
     
-    long getClassCount() {
-        return classes.size()
-    }
-    
     Collection getTests() {
         def list = []
         
@@ -111,10 +103,6 @@
         }
         
         return list.sort()
-    }
-    
-    long getTestCount() {
-        return tests.size()
     }
     
     String getHref() {

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/PackageModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/PackageModel.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/PackageModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/PackageModel.groovy
Sun Feb 11 08:32:01 2007
@@ -45,10 +45,6 @@
         return children.values().sort()
     }
     
-    long getClassCount() {
-        return classes.size()
-    }
-    
     Collection getTests() {
         def list = []
         
@@ -57,10 +53,6 @@
         }
         
         return list.sort()
-    }
-    
-    long getTestCount() {
-        return tests.size()
     }
     
     String getHref() {

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/SuiteModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/SuiteModel.groovy?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/SuiteModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/SuiteModel.groovy
Sun Feb 11 08:32:01 2007
@@ -51,7 +51,7 @@
         def model = new IterationModel(name)
         model.runtestsProperties = props
         
-        return addChild(name, model)
+        return addChild(model)
     }
     
     def leftShift(TestCase testCase) {

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-detail.vm
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-detail.vm?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-detail.vm
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-detail.vm
Sun Feb 11 08:32:01 2007
@@ -55,7 +55,7 @@
     
     #macro (logFileLink $model $file $desc)
         <tr>
-            <td><a href="$baseURI/${file}-${model.iterationIndex}.html">$file</a></td>
+            <td><a href="$baseURI/logs/${file}-${model.iterationIndex}.html">$file</a></td>
             <td>$helper.logFileSize("$file")</td>
             <td>$desc</td>
         </tr>

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-log.vm
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-log.vm?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-log.vm
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-log.vm
Sun Feb 11 08:32:01 2007
@@ -28,6 +28,18 @@
     
     <h2><a href="$baseURI/$model.href">Iteration $model.displayName</a>
- $logFile.name</h2>
     
-    <pre class="logContents">$helper.eval("new File('$logFile').text")</pre>
+    ##
+    ## NOTE: Load as iter to have a prayer of handling huge files
+    ##
+    
+    #set ($content = $helper.eval("new File('$logFile').iterator()"))
+    
+    ##
+    ## NOTE: Whacky line placement to get newlines correct
+    ##
+    
+    <pre class="logContents">#foreach ($line in $content)$line
+#end</pre>
+
 </body>
 </html>

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/macros.vm
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/macros.vm?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/macros.vm
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/macros.vm
Sun Feb 11 08:32:01 2007
@@ -132,7 +132,7 @@
 #end
 
 #macro (barGraph $successRate)
-    #set ($passBarSize = $helper.eval("(int) $successRate * 2"))
+    #set ($passBarSize = $successRate * 2)
     #set ($failBarSize = 200 - $passBarSize)
     
     <table width="200" height="15" cellpadding="0" cellspacing="0" border="0" class="barGraph">
@@ -155,7 +155,7 @@
         <td align="center" width="20">#icon($model.statusIcon)</td>
         <td align="left"><a href="$baseURI/$model.href">$model.displayName</a></td>
         <td align="right">$model.count</td>
-        <td align="center" width="210">#barGraph($model.successRate)</td>
+        <td align="center" width="210">#barGraph($model.successRateAsInteger)</td>
         <td align="right">$model.duration</td>
     </tr>
 #end
@@ -197,7 +197,7 @@
             </tr>
             <tr>
                 <td>Success Rate</td>
-                <td align="center" width="210">#barGraph($model.successRate)</td>
+                <td align="center" width="210">#barGraph($model.successRateAsInteger)</td>
             </tr>
             <tr>
                 <td>Duration</td>

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/overview-summary.vm
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/overview-summary.vm?view=diff&rev=506064&r1=506063&r2=506064
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/overview-summary.vm
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/overview-summary.vm
Sun Feb 11 08:32:01 2007
@@ -26,7 +26,7 @@
 <body onload="windowTitle();">
     #topNavBar()
     
-    <h2>Summary</h2>
+    <h2>Test Summary</h2>
     
     <table>
         <tbody>
@@ -60,7 +60,7 @@
             </tr>
             <tr>
                 <td>Success Rate</td>
-                <td align="center" width="210">#barGraph($model.successRate)</td>
+                <td align="center" width="210">#barGraph($model.successRateAsInteger)</td>
             </tr>
             
             ##
@@ -74,7 +74,7 @@
         </tbody>
     </table>
     
-    <h2>Assembly</h2>
+    <h2>Assembly Details</h2>
     
     ##
     ## TODO: More details on the CTS assembly (and the G assembly its built on)



Mime
View raw message