geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r508115 - in /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report: ReportGenerator.groovy model/IterationModel.groovy resources/iteration-detail.vm
Date Thu, 15 Feb 2007 20:08:21 GMT
Author: jdillon
Date: Thu Feb 15 12:08:20 2007
New Revision: 508115

URL: http://svn.apache.org/viewvc?view=rev&rev=508115
Log:
Better support for iteration 0 (custom runtests) report generation

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/IterationModel.groovy
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/report/resources/iteration-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=508115&r1=508114&r2=508115
==============================================================================
--- 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
Thu Feb 15 12:08:20 2007
@@ -185,12 +185,11 @@
             def iterModel = suiteModel.createIteration(props)
             
             //
-            // FIXME: For iteration '0' (runtests from single mode) we don't have an iteration,
-            //        so the report here is going to have some invalid names on it... :-(
+            // NOTE: For iteration '0' (runtests from single mode) we don't have an iteration,
             //
-            
-            // Attach the iteration config (xml node)
-            iterModel.iterationConfig = iterConfig.iteration[iterModel.iterationIndex - 1]
+            if (iterModel.iterationIndex != 0) {
+                iterModel.iterationConfig = iterConfig.iteration[iterModel.iterationIndex
- 1]
+            }
             
             // Can log this now, since it has the iter config loaded
             log.info "Processing iteration $iterModel.name ($iterModel.displayName)"

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=508115&r1=508114&r2=508115
==============================================================================
--- 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
Thu Feb 15 12:08:20 2007
@@ -61,10 +61,19 @@
     }
     
     String getDisplayName() {
-        return "${iterationIndex} :: " + iterationConfig.get('name').text()
+        if (iterationIndex != 0) {
+            return "${iterationIndex} :: " + iterationConfig.get('name').text()
+        }
+        else {
+            return "${iterationIndex} :: Custom"
+        }
     }
     
     Collection getTestConfiguration() {
+        if (iterationIndex == 0) {
+            return []
+        }
+        
         def list = []
         
         iterationConfig.tests.test.each {
@@ -75,6 +84,9 @@
     }
     
     String getOptionsConfiguration() {
+        if (iterationIndex == 0) {
+            return runtestsProperties['tests']
+        }
         if (iterationConfig.options) {
             return iterationConfig.options.text()
         }

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=508115&r1=508114&r2=508115
==============================================================================
--- 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
Thu Feb 15 12:08:20 2007
@@ -40,16 +40,22 @@
             <col width="99%"><col>
         </colgroup>
         <tbody>
-            <tr>
-                <td class="summaryTableKeyCell">Tests</td>
-                <td class="summaryTableValueCell">
-                    <ul>
-                        #foreach ($test in $model.testConfiguration)
-                            <li>$test</li>
-                        #end
-                    </ul>
-                </td>
-            </tr>
+            ##
+            ## NOTE: This is for iteration 0 (custom runtests)
+            ##       no testConfiguration is given, all covered in options (below)
+            ##
+            #if ($model.testConfiguration.size() != 0) {
+                <tr>
+                    <td class="summaryTableKeyCell">Tests</td>
+                    <td class="summaryTableValueCell">
+                        <ul>
+                            #foreach ($test in $model.testConfiguration)
+                                <li>$test</li>
+                            #end
+                        </ul>
+                    </td>
+                </tr>
+            #end
             #if ($model.optionsConfiguration)
                 #summaryRow('Options' $model.optionsConfiguration)
             #end



Mime
View raw message