Jelajahi Sumber

Initial suppport for build variants

[SVN r24454]
Misha Bergal 22 tahun lalu
induk
melakukan
f26808f068

+ 80 - 47
tools/regression/xsl_reports/xsl/v2/common.xsl

@@ -22,6 +22,8 @@
 
     <xsl:variable name="output_directory" select="'output'"/>
 
+    <!-- structural -->
+
     <func:function name="meta:test_structure">
         <xsl:param name="document"/>
         <xsl:param name="release"/>
@@ -85,47 +87,6 @@
         <func:result select="exsl:node-set( $run_toolsets_f )"/>
     </func:function>
 
-    <xsl:template name="get_toolsets">
-        <xsl:param name="toolsets"/>
-        <xsl:param name="required-toolsets"/>
-        
-        <xsl:variable name="toolset_output">
-        <xsl:for-each select="$toolsets">
-            <xsl:variable name="toolset" select="."/>
-            <xsl:element name="toolset">
-            <xsl:attribute name="toolset"><xsl:value-of select="$toolset"/></xsl:attribute>
-            <xsl:choose>
-                <xsl:when test="$required_toolsets[ $toolset = @name ]">
-                <xsl:attribute name="required">yes</xsl:attribute>
-                <xsl:attribute name="sort">a</xsl:attribute>
-                </xsl:when>
-                <xsl:otherwise>
-                <xsl:attribute name="required">no</xsl:attribute>
-                <xsl:attribute name="sort">z</xsl:attribute>
-                </xsl:otherwise>
-            </xsl:choose>
-            </xsl:element>
-        </xsl:for-each>
-        </xsl:variable>
-    
-        <xsl:for-each select="exsl:node-set( $toolset_output )/toolset">
-            <xsl:sort select="concat( @sort, ' ', @toolset)" order="ascending"/>
-            <xsl:copy-of select="."/>
-        </xsl:for-each>
-    
-    </xsl:template>
-
-    <func:function name="meta:show_output">
-        <xsl:param name="explicit_markup"/>     
-        <xsl:param name="test_log"/>     
-        <func:result select="$test_log/@result != 'success' and not( meta:is_unusable( $explicit_markup, $test_log/@library, $test_log/@toolset )) or $test_log/@show-run-output = 'true'"/>
-    </func:function>
-
-    <func:function name="meta:show_toolset">
-        <xsl:param name="toolset"/>
-        <xsl:param name="release" select="'no'"/>
-        <func:result select="$release != 'yes' or meta:is_toolset_required( $toolset )"/>
-    </func:function>
 
     <func:function name="meta:test_case_status">
         <xsl:param name="test_log"/>
@@ -156,12 +117,6 @@
          <func:result select="$status"/>
      </func:function>
 
-    <func:function name="meta:show_library">
-        <xsl:param name="library"/>
-        <xsl:param name="release" select="'no'"/>
-        <func:result select="$release != 'yes' or not( meta:is_library_beta( $library ) )"/>
-    </func:function>
-
     <func:function name="meta:is_toolset_required">
         <xsl:param name="toolset"/>
         <func:result select="count( $explicit_markup/explicit-failures-markup/mark-toolset[ @name = $toolset and @status='required' ] ) > 0"/>
@@ -185,6 +140,8 @@
         <func:result select="$explicit_markup//library[ @name = $library ]/mark-unusable[ toolset/@name = $toolset or toolset/@name='*' ]"/>
     </func:function>
 
+    <!-- path -->
+
     <func:function name="meta:encode_path">
         <xsl:param name="path"/>
         <func:result select="translate( translate( $path, '/', '-' ), './', '-' )"/>
@@ -195,6 +152,82 @@
         <func:result select="concat( $output_directory, '/', meta:encode_path( $path ), '.html' )"/>
     </func:function>
 
+    <func:function name="meta:log_file_path">
+        <xsl:param name="test_log"/>
+        <func:result>
+            <xsl:choose>
+                <xsl:when test="meta:show_output( $explicit_markup, $test_log )">
+                    <xsl:value-of select="meta:output_file_path( concat( $test_log/../@runner, '-', $test_log/@target-directory ) )"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:text></xsl:text>
+                </xsl:otherwise>
+            </xsl:choose>
+        </func:result>
+    </func:function>
+
+    <!-- presentation -->
+
+    <func:function name="meta:show_library">
+        <xsl:param name="library"/>
+        <xsl:param name="release" select="'no'"/>
+        <func:result select="$release != 'yes' or not( meta:is_library_beta( $library ) )"/>
+    </func:function>
+
+    <func:function name="meta:show_output">
+        <xsl:param name="explicit_markup"/>     
+        <xsl:param name="test_log"/>     
+        <func:result select="$test_log/@result != 'success' and not( meta:is_unusable( $explicit_markup, $test_log/@library, $test_log/@toolset )) or $test_log/@show-run-output = 'true'"/>
+    </func:function>
+
+    <func:function name="meta:show_toolset">
+        <xsl:param name="toolset"/>
+        <xsl:param name="release" select="'no'"/>
+        <func:result select="$release != 'yes' or meta:is_toolset_required( $toolset )"/>
+    </func:function>
+
+    <func:function name="meta:result_cell_class">
+        <xsl:param name="library"/>
+        <xsl:param name="toolset"/>
+        <xsl:param name="test_logs"/>
+
+        <func:result>
+            <xsl:choose>
+                <xsl:when test="meta:is_unusable( $explicit_markup, $library, $toolset )">
+                    <xsl:text>unusable</xsl:text>
+                </xsl:when>
+                
+                <xsl:when test="count( $test_logs ) &lt; 1">
+                    <xsl:text>missing</xsl:text>
+                </xsl:when>
+                
+                <xsl:when test="count( $test_logs[@result='fail' and  @status='unexpected' and @is-new='no'] )">
+                    <xsl:text>fail-unexpected</xsl:text>
+                </xsl:when>
+                
+                <xsl:when test="count( $test_logs[@result='fail' and  @status='unexpected' and @is-new='yes'] )">
+                    <xsl:text>fail-unexpected-new</xsl:text>
+                </xsl:when>
+
+                <xsl:when test="count( $test_logs[@result='fail'] )">
+                    <xsl:text>fail-expected</xsl:text>
+                </xsl:when>
+                
+                <xsl:when test="count( $test_logs[@result='success' and  @status='unexpected'] )">
+                    <xsl:text>success-unexpected</xsl:text>
+                </xsl:when>
+                
+                <xsl:when test="count( $test_logs[@status='expected'] )">
+                    <xsl:text>success-expected</xsl:text>
+                </xsl:when>
+                
+                <xsl:otherwise>
+                    <xsl:text>unknown</xsl:text>
+                </xsl:otherwise>
+            </xsl:choose>
+        </func:result>
+    </func:function>
+
     <xsl:template name="insert_platforms_row">
         <xsl:variable name="colspan">
             <xsl:choose>

+ 2 - 1
tools/regression/xsl_reports/xsl/v2/html/master.css

@@ -231,7 +231,8 @@ tr.summary-row td
 ,td.library-fail-expected
 ,td.library-user-fail-expected
 ,td.library-user-success
-,td.summary-expected
+,td.summary-success-expected
+,td.summary-fail-expected
 ,td.summary-user-fail-expected
 ,td.summary-user-success
 ,td.summary-unknown-status

+ 112 - 64
tools/regression/xsl_reports/xsl/v2/result_page.xsl

@@ -58,10 +58,18 @@
     <xsl:variable name="run_toolsets" select="meta:test_structure( /, $release )"/>
 
     <!-- libraries -->
+
     <xsl:variable name="test_case_logs" select="//test-log[ meta:is_test_log_a_test_case(.) ]"/>
     <xsl:variable name="libraries" select="set:distinct( $test_case_logs/@library )"/>
 
 
+    <!-- modes -->
+
+    <xsl:variable name="release_postfix">
+        <xsl:if test="$release='yes'">
+            <xsl:text>_release</xsl:text>
+        </xsl:if>
+    </xsl:variable>
 
 
     <xsl:template name="test_type_col">
@@ -100,12 +108,6 @@
 
         </exsl:document>
 
-        <xsl:variable name="release_postfix">
-            <xsl:if test="$release='yes'">
-                <xsl:text>_release</xsl:text>
-            </xsl:if>
-        </xsl:variable>
-
         <xsl:variable name="index_path" select="concat( 'index_', $release_postfix, '.html' )"/>
         
         <!-- Index page -->
@@ -414,65 +416,117 @@
         <xsl:param name="library"/>
         <xsl:param name="toolset"/>
         <xsl:param name="test_log"/>
-        <xsl:param name="log_link"/>
         
         <xsl:variable name="is_new">
-        <xsl:if test="$test_log/@is-new = 'yes' and $test_log/@status = 'unexpected' and $test_log/@result != 'success'">
-            <xsl:value-of select="'-new'"/>
-        </xsl:if>
+            <xsl:if test="$test_log/@is-new = 'yes' and $test_log/@status = 'unexpected' and $test_log/@result != 'success'">
+                <xsl:value-of select="'-new'"/>
+            </xsl:if>
         </xsl:variable>
 
-        <xsl:variable name="class">
-        <xsl:choose>
-            <xsl:when test="meta:is_unusable( $explicit_markup, $library, $toolset )">
-                <xsl:text>library-unusable</xsl:text>
-            </xsl:when>
-            <xsl:when test="not( $test_log )">
-                <xsl:text>library-missing</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:value-of select="concat( 'library-', $test_log/@result, '-', $test_log/@status, $is_new )"/>
-            </xsl:otherwise>
-        </xsl:choose>
+        
+        <xsl:variable name="class" select="concat( 'library-', meta:result_cell_class( $library, $toolset, $test_log ) )"/>
+
+        <xsl:variable name="cell_link">
+            <xsl:choose>
+                <xsl:when test="count( $test_log ) &gt; 1">
+                    <xsl:variable name="variants_file_path" select="concat( meta:encode_path( concat( $test_log/../@runner, '-', $test_log/@library, '-', $test_log/@toolset, '-', $test_log/@test-name, '-variants' ) ), '.html' )"/>
+                    <xsl:variable name="variants__file_path" select="concat( meta:encode_path( concat( $test_log/../@runner, '-', $test_log/@library, '-', $test_log/@toolset, '-', $test_log/@test-name, '-variants_' ) ), '.html' )"/>
+                    <xsl:message>Writing variants file <xsl:value-of select="$variants_file_path"/></xsl:message>
+                    
+                    <exsl:document href="{$variants_file_path}"
+                        method="html" 
+                        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                        encoding="utf-8"
+                        indent="yes">
+                        <html>
+                            <head>
+                                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+                                <title>Boost regression: <xsl:value-of select="$library"/>/<xsl:value-of select="$source"/></title>
+                            </head>
+                            <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+                                <frame name="tocframe" src="toc{$release_postfix}.html" scrolling="auto"/>
+                                <frame name="docframe" src="{$variants__file_path}" scrolling="auto"/>
+                            </frameset>
+                        </html>
+                    </exsl:document>  
+
+                    <exsl:document href="{$variants__file_path}"
+                        method="html" 
+                        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                        encoding="utf-8"
+                        indent="yes">
+
+                        <html>
+                            <body>
+                                <table>
+                                    <xsl:for-each select="$test_log">
+                                        <tr>
+                                            <td>
+                                                <!--<debug>
+                                                    <xsl:copy-of select="."/>
+
+                                                    <xsl:value-of select="meta:show_output( $explicit_markup, . )"/>
+                                                    <xsl:value-of select="meta:log_file_path(.)"/>
+                                                </debug>-->
+                                                <xsl:choose>
+                                                    <xsl:when test="meta:log_file_path(.) != ''">
+                                                        <a href="{meta:log_file_path(.)}" target="_top" >
+                                                            <xsl:value-of select="@target-directory"/>
+                                                        </a>
+                                                    </xsl:when>
+                                                    <xsl:otherwise>
+                                                        <xsl:value-of select="@target-directory"/>
+                                                    </xsl:otherwise>
+                                                </xsl:choose>
+                                            </td>
+                                        </tr>
+                                    </xsl:for-each>
+                                </table>
+                            </body>
+                        </html>
+                    </exsl:document>           
+                    <xsl:value-of select="$variants_file_path"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="meta:log_file_path($test_log)"/>
+                </xsl:otherwise>
+            </xsl:choose>
         </xsl:variable>
 
         <td class="{$class}">
         <xsl:choose>
-            <xsl:when test="not( $test_log )">
+            <xsl:when test="count( $test_log ) &lt; 1">
                 <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
             </xsl:when> 
  
             <xsl:when test="$test_log/@result != 'success' and $test_log/@status = 'expected'">
                     <xsl:call-template name="insert_test_result">
                         <xsl:with-param name="result" select="'fail'"/>
-                        <xsl:with-param name="log_link" select="$log_link"/>
+                        <xsl:with-param name="log_link" select="$cell_link"/>
                     </xsl:call-template>
             </xsl:when>
 
             <xsl:when test="$test_log/@result != 'success' and $test_log/@status = 'unexpected'">
                     <xsl:call-template name="insert_test_result">
                         <xsl:with-param name="result" select="'fail'"/>
-                        <xsl:with-param name="log_link" select="$log_link"/>
+                        <xsl:with-param name="log_link" select="$cell_link"/>
                     </xsl:call-template>
             </xsl:when>
 
             <xsl:when test="$test_log/@result = 'success' and $test_log/@status = 'unexpected'">
                     <xsl:call-template name="insert_test_result">
                         <xsl:with-param name="result" select="'pass'"/>
-                        <xsl:with-param name="log_link" select="$log_link"/>
+                        <xsl:with-param name="log_link" select="$cell_link"/>
                     </xsl:call-template>
             </xsl:when>
 
             <xsl:otherwise>
                     <xsl:call-template name="insert_test_result">
                         <xsl:with-param name="result" select="'pass'"/>
-                        <xsl:with-param name="log_link" select="$log_link"/>
+                        <xsl:with-param name="log_link" select="$cell_link"/>
                     </xsl:call-template>
             </xsl:otherwise>
         </xsl:choose>  
-        <xsl:if test="count( $test_log ) > 1" > 
-            <div class="library-conf-problem">conf.&#160;problem</div>
-        </xsl:if>
         </td>
     </xsl:template>
 
@@ -529,9 +583,9 @@
             </xsl:otherwise>
         </xsl:choose>  
 
-        <xsl:if test="count( $test_log ) > 1" > 
+        <!--<xsl:if test="count( $test_log ) > 1" > 
             <div class="conf-problem">conf.&#160;problem</div>
-        </xsl:if>
+        </xsl:if>-->
         </td>
     </xsl:template>
 
@@ -565,38 +619,33 @@
             <!-- Write log file -->
             <xsl:variable name="test_result_for_toolset" select="$test_results[ @toolset = $toolset and ../@runner=$runner ]"/>
 
-            <xsl:variable name="log_file">
-                <xsl:choose>
-                    <xsl:when test="meta:show_output( $explicit_markup, $test_result_for_toolset )">
-                        <xsl:value-of select="meta:output_file_path( concat( $test_result_for_toolset/../@runner, '-', $test_result_for_toolset/@target-directory ) )"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:text></xsl:text>
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:variable>
 
-            
-            <xsl:if test="$release != 'yes' and count( $test_result_for_toolset ) > 0 and $log_file != '' ">
-                <xsl:message>Writing log file document  <xsl:value-of select="$log_file"/></xsl:message>
-                    <exsl:document href="{$log_file}"
-                        method="html" 
-                        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
-                        encoding="utf-8"
-                        indent="yes">
-                        
-                        <html>
-                            <head>
-                                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
-                                <!--<title>Boost regression unresolved issues: <xsl:value-of select="$source"/></title>-->
-                            </head>
-                            <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
-                                <frame name="tocframe" src="../toc.html" scrolling="auto"/>
-                                <frame name="docframe" src="../../{$log_file}" scrolling="auto"/>
-                            </frameset>
-                        </html>
-                    </exsl:document>
-            </xsl:if>
+            <xsl:for-each select="$test_result_for_toolset">
+                <xsl:variable name="log_file" select="meta:log_file_path(.)"/>
+
+                <xsl:if test="$release != 'yes' and count( $test_result_for_toolset ) > 0 and $log_file != '' ">
+                    <xsl:message>Writing log file document  <xsl:value-of select="$log_file"/></xsl:message>
+                        <exsl:document href="{$log_file}"
+                            method="html" 
+                            doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                            encoding="utf-8"
+                            indent="yes">
+                            
+                            <html>
+                                <head>
+                                    <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+                                    <!--<title>Boost regression unresolved issues: <xsl:value-of select="$source"/></title>-->
+                                </head>
+                                <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+                                    <frame name="tocframe" src="../toc.html" scrolling="auto"/>
+                                    <frame name="docframe" src="../../{$log_file}" scrolling="auto"/>
+                                </frameset>
+                            </html>
+                        </exsl:document>
+                    </xsl:if>
+                
+            </xsl:for-each>
+
 
             <!-- Insert cell -->
             <xsl:choose>
@@ -613,7 +662,6 @@
                 <xsl:with-param name="library" select="$library"/>
                 <xsl:with-param name="toolset" select="$toolset"/>
                 <xsl:with-param name="test_log" select="$test_result_for_toolset"/>
-                <xsl:with-param name="log_link" select="$log_file"/>
                 </xsl:call-template>
             </xsl:when>
             </xsl:choose>

+ 5 - 29
tools/regression/xsl_reports/xsl/v2/summary_page.xsl

@@ -221,36 +221,12 @@
 
     <!-- report developer status -->
     <xsl:template name="insert_cell_developer">
-    <xsl:param name="current_cell"/>
-    <xsl:param name="library"/>
-    <xsl:param name="toolset"/>
-    <xsl:param name="expected_test_count"/>
+        <xsl:param name="current_cell"/>
+        <xsl:param name="library"/>
+        <xsl:param name="toolset"/>
+        <xsl:param name="expected_test_count"/>
 
-    <xsl:variable name="class">
-        <xsl:choose> 
-        <xsl:when test="meta:is_unusable( $explicit_markup, $library, $toolset )">
-            <xsl:text>summary-unusable</xsl:text>
-        </xsl:when>
-        <xsl:when test="count( $current_cell ) = 0">
-            <xsl:text>summary-missing</xsl:text>
-        </xsl:when>
-        <xsl:when test="count( $current_cell[@result='fail' and  @status='unexpected' and @is-new='no'] )">
-            <xsl:text>summary-fail-unexpected</xsl:text>
-        </xsl:when>
-        <xsl:when test="count( $current_cell[@result='fail' and  @status='unexpected' and @is-new='yes'] )">
-            <xsl:text>summary-fail-unexpected-new</xsl:text>
-        </xsl:when>
-        <xsl:when test="count( $current_cell[@result='success' and  @status='unexpected'] )">
-            <xsl:text>summary-success-unexpected</xsl:text>
-        </xsl:when>
-        <xsl:when test="count( $current_cell[@status='expected'] )">
-            <xsl:text>summary-expected</xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-            <xsl:value-of select="count( $current_cell )"/>
-        </xsl:otherwise>
-        </xsl:choose>
-    </xsl:variable>
+    <xsl:variable name="class" select="concat( 'summary-', meta:result_cell_class( $library, $toolset, $current_cell ) )"/>
       
     <xsl:variable name="library_page" select="meta:encode_path( $library )" />
 

粤ICP备19079148号