Просмотр исходного кода

Implemented grouping by platform

[SVN r24288]
Misha Bergal 22 лет назад
Родитель
Сommit
fc596076ca

+ 93 - 49
tools/regression/xsl_reports/xsl/v2/common.xsl

@@ -28,50 +28,60 @@
         <xsl:variable name="required_toolsets" select="$explicit_markup//mark-toolset[ @status='required' ]"/>
         <xsl:variable name="required_toolsets" select="$explicit_markup//mark-toolset[ @status='required' ]"/>
 
 
         <xsl:variable name="runs" select="$document//test-run"/>
         <xsl:variable name="runs" select="$document//test-run"/>
+        <xsl:variable name="platforms" select="set:distinct( $document//test-run/@platform )"/>
+        
+        
         <xsl:variable name="run_toolsets_f">
         <xsl:variable name="run_toolsets_f">
-        <runs>
-            <xsl:for-each select="$runs">
-                <run 
-                    runner="{@runner}" 
-                    timestamp="{@timestamp}" 
-                    platform="{@platform}"
-                    run-type="{@run-type}"
-                    source="{@source}">
-
-                    <comment><xsl:value-of select="comment"/></comment>
-                    <xsl:variable name="not_ordered_toolsets" select="set:distinct( .//test-log[ meta:is_test_log_a_test_case(.) and meta:show_toolset( @toolset, $release ) ]/@toolset ) "/>
-
-                    <xsl:variable name="not_ordered_toolsets_with_info_f">
-                        <xsl:for-each select="$not_ordered_toolsets">
-                            <xsl:sort select="." order="ascending"/>
-                            <xsl:variable name="toolset" select="."/>
-                            <xsl:variable name="required">
-                                <xsl:choose>
-                                    <xsl:when test="count( $required_toolsets[ @name = $toolset ] ) > 0">yes</xsl:when>
-                                    <xsl:otherwise>no</xsl:otherwise>
-                                </xsl:choose>
-                            </xsl:variable>
-                            <xsl:variable name="required_sort_hint">
-                                <xsl:choose>
-                                    <xsl:when test="$required = 'yes'">sort hint A</xsl:when>
-                                    <xsl:otherwise>sort hint B</xsl:otherwise>
-                                </xsl:choose>
-                            </xsl:variable>
-                            <toolset name="{$toolset}" required="{$required}" required_sort_hint="{$required_sort_hint}"/>
-                        </xsl:for-each>
-                    </xsl:variable>
-
-                    <xsl:variable name="not_ordered_toolsets_with_info" select="exsl:node-set( $not_ordered_toolsets_with_info_f )"/>
-                    
-                    <xsl:for-each select="$not_ordered_toolsets_with_info/toolset">
-                        <xsl:sort select="concat( @required_sort_hint, '-', @name )" order="ascending"/>
-                        <xsl:copy-of select="."/>
+            <platforms>
+                <xsl:for-each select="$platforms">
+                    <xsl:variable name="platform" select="."/>
+                    <platform name="{$platform}">
+                        <runs>
+                            <xsl:for-each select="$runs[ @platform = $platform ]">
+                                <xsl:sort select="."/>
+                                <run 
+                                    runner="{@runner}" 
+                                    timestamp="{@timestamp}" 
+                                    platform="{@platform}"
+                                    run-type="{@run-type}"
+                                    source="{@source}">
+                            
+                                    <comment><xsl:value-of select="comment"/></comment>
+                                    <xsl:variable name="not_ordered_toolsets" select="set:distinct( .//test-log[ meta:is_test_log_a_test_case(.) and meta:show_toolset( @toolset, $release ) ]/@toolset ) "/>
+                                    
+                                    <xsl:variable name="not_ordered_toolsets_with_info_f">
+                                        <xsl:for-each select="$not_ordered_toolsets">
+                                            <xsl:sort select="." order="ascending"/>
+                                            <xsl:variable name="toolset" select="."/>
+                                            <xsl:variable name="required">
+                                                <xsl:choose>
+                                                    <xsl:when test="count( $required_toolsets[ @name = $toolset ] ) > 0">yes</xsl:when>
+                                                        <xsl:otherwise>no</xsl:otherwise>
+                                                    </xsl:choose>
+                                                </xsl:variable>
+                                                <xsl:variable name="required_sort_hint">
+                                                    <xsl:choose>
+                                                        <xsl:when test="$required = 'yes'">sort hint A</xsl:when>
+                                                        <xsl:otherwise>sort hint B</xsl:otherwise>
+                                                    </xsl:choose>
+                                                </xsl:variable>
+                                                <toolset name="{$toolset}" required="{$required}" required_sort_hint="{$required_sort_hint}"/>
+                                            </xsl:for-each>
+                                        </xsl:variable>
+                                        
+                                        <xsl:variable name="not_ordered_toolsets_with_info" select="exsl:node-set( $not_ordered_toolsets_with_info_f )"/>
+                                        
+                                        <xsl:for-each select="$not_ordered_toolsets_with_info/toolset">
+                                            <xsl:sort select="concat( @required_sort_hint, '-', @name )" order="ascending"/>
+                                            <xsl:copy-of select="."/>
+                                        </xsl:for-each>
+                                    </run>
+                                </xsl:for-each>
+                            </runs>
+                        </platform>
                     </xsl:for-each>
                     </xsl:for-each>
-                </run>
-            </xsl:for-each>
-        </runs>
-        </xsl:variable>
-
+                </platforms>
+            </xsl:variable>
         <func:result select="exsl:node-set( $run_toolsets_f )"/>
         <func:result select="exsl:node-set( $run_toolsets_f )"/>
     </func:function>
     </func:function>
 
 
@@ -185,25 +195,47 @@
         <func:result select="concat( $output_directory, '/', meta:encode_path( $path ), '.html' )"/>
         <func:result select="concat( $output_directory, '/', meta:encode_path( $path ), '.html' )"/>
     </func:function>
     </func:function>
 
 
+    <xsl:template name="insert_platforms_row">
+        <xsl:variable name="colspan">
+            <xsl:choose>
+                <xsl:when test="$mode = 'summary'">1</xsl:when>
+                <xsl:when test="$mode = 'details'">2</xsl:when>
+            </xsl:choose>
+        </xsl:variable>
+
+    </xsl:template>
+
     <xsl:template name="insert_runners_rows">
     <xsl:template name="insert_runners_rows">
         <xsl:param name="mode"/>
         <xsl:param name="mode"/>
-        
+        <xsl:param name="top_or_bottom"/>
+
         <xsl:variable name="colspan">
         <xsl:variable name="colspan">
             <xsl:choose>
             <xsl:choose>
                 <xsl:when test="$mode = 'summary'">1</xsl:when>
                 <xsl:when test="$mode = 'summary'">1</xsl:when>
                 <xsl:when test="$mode = 'details'">2</xsl:when>
                 <xsl:when test="$mode = 'details'">2</xsl:when>
             </xsl:choose>
             </xsl:choose>
         </xsl:variable>
         </xsl:variable>
-        
+
+
+        <xsl:if test="$top_or_bottom = 'top'">
+            <tr>
+                <td colspan="{$colspan}">&#160;</td>
+                <xsl:for-each select="$run_toolsets/platforms/platform">
+                    <td colspan="{count(./runs/run/toolset)}" class="runner">
+                        <xsl:value-of select="@name"/>
+                    </td>
+                </xsl:for-each>
+                <td colspan="{$colspan}">&#160;</td>
+            </tr>
+        </xsl:if>
+
         <tr>
         <tr>
             <td colspan="{$colspan}">&#160;</td>
             <td colspan="{$colspan}">&#160;</td>
-            <xsl:for-each select="$run_toolsets/runs/run[ count(toolset) > 0 ]">
+            <xsl:for-each select="$run_toolsets//runs/run[ count(toolset) > 0 ]">
                 <td colspan="{count(toolset)}" class="runner">
                 <td colspan="{count(toolset)}" class="runner">
                     <a href="../{@runner}.html">
                     <a href="../{@runner}.html">
                         <xsl:value-of select="@runner"/>
                         <xsl:value-of select="@runner"/>
                     </a>
                     </a>
-                    <br/>
-                    <xsl:value-of select="@platform"/>
                 </td>
                 </td>
             </xsl:for-each>
             </xsl:for-each>
             <td colspan="{$colspan}">&#160;</td>
             <td colspan="{$colspan}">&#160;</td>
@@ -211,12 +243,24 @@
 
 
         <tr>
         <tr>
             <td colspan="{$colspan}">&#160;</td>
             <td colspan="{$colspan}">&#160;</td>
-            <xsl:for-each select="$run_toolsets/runs/run[ count(toolset) > 0 ]">
+            <xsl:for-each select="$run_toolsets//runs/run[ count(toolset) > 0 ]">
                 <td colspan="{count(toolset)}" class="timestamp"><xsl:value-of select="@timestamp"/></td>
                 <td colspan="{count(toolset)}" class="timestamp"><xsl:value-of select="@timestamp"/></td>
             </xsl:for-each>
             </xsl:for-each>
             <td colspan="{$colspan}">&#160;</td>
             <td colspan="{$colspan}">&#160;</td>
         </tr>
         </tr>
 
 
+        <xsl:if test="$top_or_bottom = 'bottom'">
+            <tr>
+                <td colspan="{$colspan}">&#160;</td>
+                <xsl:for-each select="$run_toolsets/platforms/platform">
+                    <td colspan="{count(./runs/run/toolset)}" class="runner">
+                        <xsl:value-of select="@name"/>
+                    </td>
+                </xsl:for-each>
+                <td colspan="{$colspan}">&#160;</td>
+            </tr>
+        </xsl:if>
+
     </xsl:template>
     </xsl:template>
 
 
     <xsl:template name="insert_toolsets_row">
     <xsl:template name="insert_toolsets_row">
@@ -242,7 +286,7 @@
             <td class="head" colspan="{$colspan}" width="1%"><xsl:value-of select="$title"/></td>
             <td class="head" colspan="{$colspan}" width="1%"><xsl:value-of select="$title"/></td>
               
               
 
 
-            <xsl:for-each select="$run_toolsets/runs/run/toolset">
+            <xsl:for-each select="$run_toolsets//runs/run/toolset">
                 <xsl:variable name="toolset" select="@name"/>
                 <xsl:variable name="toolset" select="@name"/>
                   
                   
                 <xsl:variable name="class">
                 <xsl:variable name="class">

+ 4 - 2
tools/regression/xsl_reports/xsl/v2/result_page.xsl

@@ -286,6 +286,7 @@
                     <thead>
                     <thead>
                       <xsl:call-template name="insert_runners_rows">
                       <xsl:call-template name="insert_runners_rows">
                         <xsl:with-param name="mode" select="'details'"/>
                         <xsl:with-param name="mode" select="'details'"/>
+                        <xsl:with-param name="top_or_bottom" select="'top'"/>
                         <xsl:with-param name="run_toolsets" select="$run_toolsets"/>
                         <xsl:with-param name="run_toolsets" select="$run_toolsets"/>
                       </xsl:call-template>
                       </xsl:call-template>
                       
                       
@@ -304,6 +305,7 @@
 
 
                       <xsl:call-template name="insert_runners_rows">
                       <xsl:call-template name="insert_runners_rows">
                           <xsl:with-param name="mode" select="'details'"/>
                           <xsl:with-param name="mode" select="'details'"/>
+                          <xsl:with-param name="top_or_bottom" select="'bottom'"/>
                       </xsl:call-template>
                       </xsl:call-template>
                     </tfoot>
                     </tfoot>
 
 
@@ -337,7 +339,7 @@
                         <xsl:if test="count( $lib_corner_case_tests ) > 0">
                         <xsl:if test="count( $lib_corner_case_tests ) > 0">
                             <tr>
                             <tr>
                                 <!--<td colspan="2">&#160;</td>                  -->
                                 <!--<td colspan="2">&#160;</td>                  -->
-                                <td class="library-corner-case-header" colspan="{count($run_toolsets/runs/run/toolset) + 3 }" align="center">Corner-case tests</td>
+                                <td class="library-corner-case-header" colspan="{count($run_toolsets/platforms/platform/runs/run/toolset) + 3 }" align="center">Corner-case tests</td>
                                 <!--<td>&#160;</td>-->
                                 <!--<td>&#160;</td>-->
                             </tr>
                             </tr>
 
 
@@ -556,7 +558,7 @@
         <xsl:copy-of select="$test_header"/>
         <xsl:copy-of select="$test_header"/>
         <xsl:call-template name="test_type_col"/>
         <xsl:call-template name="test_type_col"/>
           
           
-        <xsl:for-each select="$run_toolsets/runs/run/toolset">
+        <xsl:for-each select="$run_toolsets/platforms/platform/runs/run/toolset">
             <xsl:variable name="toolset" select="@name" />
             <xsl:variable name="toolset" select="@name" />
             <xsl:variable name="runner" select="../@runner" />
             <xsl:variable name="runner" select="../@runner" />
 
 

+ 3 - 1
tools/regression/xsl_reports/xsl/v2/summary_page.xsl

@@ -121,6 +121,7 @@
             <thead>
             <thead>
                 <xsl:call-template name="insert_runners_rows">
                 <xsl:call-template name="insert_runners_rows">
                     <xsl:with-param name="mode" select="'summary'"/>
                     <xsl:with-param name="mode" select="'summary'"/>
+                    <xsl:with-param name="top_or_bottom" select="'top'"/>
                 </xsl:call-template>
                 </xsl:call-template>
 
 
                 <xsl:call-template name="insert_toolsets_row">
                 <xsl:call-template name="insert_toolsets_row">
@@ -134,6 +135,7 @@
                 </xsl:call-template>
                 </xsl:call-template>
                 <xsl:call-template name="insert_runners_rows">
                 <xsl:call-template name="insert_runners_rows">
                     <xsl:with-param name="mode" select="'summary'"/>
                     <xsl:with-param name="mode" select="'summary'"/>
+                    <xsl:with-param name="top_or_bottom" select="'bottom'"/>
                 </xsl:call-template>
                 </xsl:call-template>
             </tfoot>
             </tfoot>
           
           
@@ -176,7 +178,7 @@
                 <tr class="summary-row{$line_mod}">
                 <tr class="summary-row{$line_mod}">
                     <xsl:copy-of select="$library_header"/>
                     <xsl:copy-of select="$library_header"/>
 
 
-                    <xsl:for-each select="$run_toolsets/runs/run/toolset">
+                    <xsl:for-each select="$run_toolsets/platforms/platform/runs/run/toolset">
                         <xsl:variable name="toolset" select="@name" />
                         <xsl:variable name="toolset" select="@name" />
                         <xsl:variable name="runner" select="../@runner" />
                         <xsl:variable name="runner" select="../@runner" />
 
 

粤ICP备19079148号