geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r505833 - in /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report: ./ model/ resources/
Date Sun, 11 Feb 2007 04:40:50 GMT
Author: jdillon
Date: Sat Feb 10 20:40:49 2007
New Revision: 505833

URL: http://svn.apache.org/viewvc?view=rev&rev=505833
Log:
Track parent model for model elements
Render the iteration each testcase came from

Modified:
    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/GroupModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestCaseModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestModel.groovy
    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/testcase-detail.vm

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=505833&r1=505832&r2=505833
==============================================================================
--- 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
Sat Feb 10 20:40:49 2007
@@ -158,6 +158,10 @@
         
         def suiteModel = new SuiteModel()
         
+        //
+        // TODO: Load the iterations.xml configuration so we can use that for rendering
+        //
+        
         archives.each { archive ->
             log.info "Processing results archive: $archive"
             
@@ -211,7 +215,7 @@
                     println "Positive_from_servlet: $file"
                 }
                 
-                iterModel << testCase
+                def model = iterModel << testCase
                 
                 //
                 // FIXME: testCase.name *might* have '.' in it which will hose up the
@@ -222,6 +226,7 @@
                 // Render testcase detail
                 def renderer = createRenderer('testcase-detail.vm', "${testCase.name}.html")
                 renderer.params.testCase = testCase
+                renderer.params.model = model
                 renderer.render()
             }
             

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=505833&r1=505832&r2=505833
==============================================================================
--- 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
Sat Feb 10 20:40:49 2007
@@ -45,7 +45,7 @@
             println "ERROR: Duplicate test case name: ${testCase.name}"
         }
         
-        super.leftShift(testCase)
+        return super.leftShift(testCase)
     }
     
     Collection getTests() {

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=505833&r1=505832&r2=505833
==============================================================================
--- 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
Sat Feb 10 20:40:49 2007
@@ -67,10 +67,11 @@
         // If non-existant, create a new one
         if (!model) {
             model = createModel(testCase)
+            model.parent = this
         }
         
         // Add the test case to the child collection
-        model << testCase
+        return model << testCase
     }
     
     protected TestModel lookupModel(TestCase testCase) {

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestCaseModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestCaseModel.groovy?view=diff&rev=505833&r1=505832&r2=505833
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestCaseModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestCaseModel.groovy
Sat Feb 10 20:40:49 2007
@@ -31,6 +31,8 @@
  */
 class TestCaseModel extends TestModel
 {
+    int iteration
+    
     String className
     
     String testName
@@ -55,12 +57,15 @@
     //
     
     def leftShift(TestCase testCase) {
-        super.leftShift(testCase)
+        def model = super.leftShift(testCase)
         
         testCaseAdded(testCase)
+        
+        return model
     }
     
     def testCaseAdded(TestCase testCase) {
+        this.iteration = parent.parent.parent.name.toInteger()
         this.className = testCase.className
         this.testName = testCase.testName
         this.started = testCase.started
@@ -94,5 +99,10 @@
             return 'icon_warning_sml.gif'
         }
     }
+    
+    //
+    // TODO: Need to have acces to the parent model so we can find out details
+    //       like what iteration we are in
+    //
 }
 

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestModel.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestModel.groovy?view=diff&rev=505833&r1=505832&r2=505833
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestModel.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/model/TestModel.groovy
Sat Feb 10 20:40:49 2007
@@ -35,6 +35,8 @@
     
     String name
     
+    GroupModel parent
+    
     protected TestModel(String name) {
         assert name
         this.name = name
@@ -58,6 +60,8 @@
         assert testCase
         
         fireTestCaseAdded(testCase)
+        
+        return this
     }
     
     int compareTo(obj) {

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=505833&r1=505832&r2=505833
==============================================================================
--- 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
Sat Feb 10 20:40:49 2007
@@ -112,3 +112,6 @@
     </table>
 #end
 
+#macro (testCaseIterationLink $test)
+    <a href="${baseURI}/iteration-${test.iteration}.html">$test.iteration</a>
+#end

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/testcase-detail.vm
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/testcase-detail.vm?view=diff&rev=505833&r1=505832&r2=505833
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/testcase-detail.vm
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/testcase-detail.vm
Sat Feb 10 20:40:49 2007
@@ -37,6 +37,10 @@
                 <td>$testCase.name</td>
             </tr>
             <tr>
+                <td>Iteration</td>
+                <td>#testCaseIterationLink($model)</td>
+            </tr>
+            <tr>
                 <td>Class</td>
                 <td>$testCase.className</td>
             </tr>



Mime
View raw message