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

Developer release reports

[SVN r24144]
Misha Bergal 22 лет назад
Родитель
Сommit
3ee2e29d47

+ 38 - 2
tools/regression/xsl_reports/report.py

@@ -16,7 +16,7 @@ import utils
 import runner
 import runner
 
 
 
 
-report_types = [ 'us', 'ds', 'ud', 'dd', 'l', 'p', 'x', 'i', 'n' ]
+report_types = [ 'us', 'ds', 'ud', 'dd', 'l', 'p', 'x', 'i', 'n', 'ddr', 'dsr' ]
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':
     run_dir = os.path.abspath( os.path.dirname( sys.argv[ 0 ] ) )
     run_dir = os.path.abspath( os.path.dirname( sys.argv[ 0 ] ) )
@@ -130,7 +130,7 @@ def make_result_pages(
                     , 'explicit_markup_file' :  failures_markup_file
                     , 'explicit_markup_file' :  failures_markup_file
                     }
                     }
                 )
                 )
-
+    
     for mode in ( 'developer', 'user' ):
     for mode in ( 'developer', 'user' ):
         if mode[0] + 's' in reports:
         if mode[0] + 's' in reports:
             utils.log( '    Making summary %s  report...' % mode )
             utils.log( '    Making summary %s  report...' % mode )
@@ -148,6 +148,42 @@ def make_result_pages(
                     }
                     }
                 )
                 )
 
 
+    if v2 and "ddr" in reports:
+        utils.log( '    Making detailed %s release report...' % mode )
+        utils.libxslt( 
+                  utils.log
+                , extended_test_results
+                , xsl_path( 'result_page.xsl', v2 )
+                , os.path.join( output_dir, "developer", 'index_release.html' )
+                , { 
+                      'links_file':             'links.html'
+                    , 'mode':                   "developer"
+                    , 'source':                 tag
+                    , 'run_date':               run_date 
+                    , 'comment_file':           comment_file
+                    , 'expected_results_file':  expected_results_file
+                    , 'explicit_markup_file' :  failures_markup_file
+                    , 'release':                "yes"
+                    }
+                )
+
+    if v2 and "dsr" in reports:
+        utils.log( '    Making summary %s release report...' % mode )
+        utils.libxslt(
+                  utils.log
+                , extended_test_results
+                , xsl_path( 'summary_page.xsl', v2 )
+                , os.path.join( output_dir, "developer", 'summary_release.html' )
+                , { 
+                      'mode' :                  "developer"
+                    , 'source':                 tag
+                    , 'run_date':               run_date 
+                    , 'comment_file':           comment_file
+                    , 'explicit_markup_file' :  failures_markup_file
+                    , 'release':                'yes'
+                    }
+                )
+        
     if 'e' in reports:
     if 'e' in reports:
         utils.log( '    Generating expected_results ...' )
         utils.log( '    Generating expected_results ...' )
         utils.libxslt(
         utils.libxslt(

+ 57 - 4
tools/regression/xsl_reports/xsl/v2/common.xsl

@@ -14,6 +14,7 @@
     xmlns:exsl="http://exslt.org/common"
     xmlns:exsl="http://exslt.org/common"
     xmlns:func="http://exslt.org/functions"
     xmlns:func="http://exslt.org/functions"
     xmlns:str="http://exslt.org/strings"
     xmlns:str="http://exslt.org/strings"
+    xmlns:set="http://exslt.org/sets"
     xmlns:meta="http://www.meta-comm.com"
     xmlns:meta="http://www.meta-comm.com"
     extension-element-prefixes="func"
     extension-element-prefixes="func"
     exclude-result-prefixes="exsl func str meta"
     exclude-result-prefixes="exsl func str meta"
@@ -23,9 +24,10 @@
 
 
     <func:function name="meta:test_structure">
     <func:function name="meta:test_structure">
         <xsl:param name="document"/>
         <xsl:param name="document"/>
+        <xsl:param name="release"/>
         <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="//test-run"/>
+        <xsl:variable name="runs" select="$document//test-run"/>
         <xsl:variable name="run_toolsets_f">
         <xsl:variable name="run_toolsets_f">
         <runs>
         <runs>
             <xsl:for-each select="$runs">
             <xsl:for-each select="$runs">
@@ -37,7 +39,7 @@
                     source="{@source}">
                     source="{@source}">
 
 
                     <comment><xsl:value-of select="comment"/></comment>
                     <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(.) ]/@toolset )"/>
+                    <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:variable name="not_ordered_toolsets_with_info_f">
                         <xsl:for-each select="$not_ordered_toolsets">
                         <xsl:for-each select="$not_ordered_toolsets">
@@ -109,6 +111,57 @@
         <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: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>
 
 
+    <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"/>
+        <xsl:param name="$explicit_markup"/>
+
+        <xsl:variable name="status">
+            <xsl:choose> 
+                 <xsl:when test="meta:is_unusable( $explicit_markup, $test_log/@library, $test_log/@toolset )">
+                     <xsl:text>unusable</xsl:text>
+                 </xsl:when>
+                 <xsl:when test="$test_log/@result='fail' and  $test_log/@status='unexpected' and $test_log/@is-new='no'">
+                     <xsl:text>fail-unexpected</xsl:text>
+                 </xsl:when>
+                 <xsl:when test="$test_log/@result='fail' and  $test_log/@status='unexpected' and $test_log/@is-new='yes'">
+                     <xsl:text>fail-unexpected-new</xsl:text>
+                 </xsl:when>
+                 <xsl:when test="$test_log/@result='success' and  $test_log/@status='unexpected'">
+                     <xsl:text>success-unexpected</xsl:text>
+                 </xsl:when>
+                 <xsl:when test="$test_log/@status='expected'">
+                     <xsl:text>expected</xsl:text>
+                 </xsl:when>
+                 <xsl:otherwise>
+                     <xsl:text>other</xsl:text>
+                 </xsl:otherwise>
+             </xsl:choose>
+         </xsl:variable>
+         <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"/>
+    </func:function>
+
+    <func:function name="meta:is_library_beta">
+        <xsl:param name="library"/>
+        <func:result select="count( $explicit_markup/explicit-failures-markup/library[ @name = $library and @status='beta' ] ) > 0"/>
+    </func:function>
+
     <func:function name="meta:is_test_log_a_test_case">
     <func:function name="meta:is_test_log_a_test_case">
         <xsl:param name="test_log"/>      
         <xsl:param name="test_log"/>      
         <func:result select="$test_log/@test-type='compile' or $test_log/@test-type='compile_fail' or $test_log/@test-type='run' or $test_log/@test-type='run_pyd'"/>
         <func:result select="$test_log/@test-type='compile' or $test_log/@test-type='compile_fail' or $test_log/@test-type='run' or $test_log/@test-type='run_pyd'"/>
@@ -144,7 +197,7 @@
         
         
         <tr>
         <tr>
             <td colspan="{$colspan}">&#160;</td>
             <td colspan="{$colspan}">&#160;</td>
-            <xsl:for-each select="$run_toolsets/runs/run">
+            <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"/>
@@ -158,7 +211,7 @@
 
 
         <tr>
         <tr>
             <td colspan="{$colspan}">&#160;</td>
             <td colspan="{$colspan}">&#160;</td>
-            <xsl:for-each select="$run_toolsets/runs/run">
+            <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>

+ 25 - 15
tools/regression/xsl_reports/xsl/v2/result_page.xsl

@@ -34,6 +34,7 @@
     <xsl:param name="comment_file"/>
     <xsl:param name="comment_file"/>
     <xsl:param name="expected_results_file"/>
     <xsl:param name="expected_results_file"/>
     <xsl:param name="explicit_markup_file"/>
     <xsl:param name="explicit_markup_file"/>
+    <xsl:param name="release"/>
 
 
     <!-- the author-specified expected test results -->
     <!-- the author-specified expected test results -->
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
@@ -54,7 +55,7 @@
     <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
     <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
 
 
     <!-- runs / toolsets -->
     <!-- runs / toolsets -->
-    <xsl:variable name="run_toolsets" select="meta:test_structure( / )"/>
+    <xsl:variable name="run_toolsets" select="meta:test_structure( /, $release )"/>
 
 
     <!-- libraries -->
     <!-- libraries -->
     <xsl:variable name="test_case_logs" select="//test-log[ meta:is_test_log_a_test_case(.) ]"/>
     <xsl:variable name="test_case_logs" select="//test-log[ meta:is_test_log_a_test_case(.) ]"/>
@@ -89,14 +90,23 @@
           encoding="utf-8"
           encoding="utf-8"
           indent="yes">
           indent="yes">
 
 
-          <runs>
-            <xsl:for-each select="$run_toolsets">
-              <xsl:copy-of select="."/>
-            </xsl:for-each>
-          </runs>
+            <debug>
+                <runs>
+                    <xsl:for-each select="$run_toolsets">
+                        <xsl:copy-of select="."/>
+                    </xsl:for-each>
+                </runs>
+            </debug>
+
         </exsl:document>
         </exsl:document>
 
 
-        <xsl:variable name="index_path" select="'index_.html'"/>
+        <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 -->
         <!-- Index page -->
         <head>
         <head>
@@ -104,7 +114,7 @@
             <title>Boost regression: <xsl:value-of select="$source"/></title>
             <title>Boost regression: <xsl:value-of select="$source"/></title>
         </head>
         </head>
         <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
         <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
-            <frame name="tocframe" src="toc.html" scrolling="auto"/>
+            <frame name="tocframe" src="toc{$release_postfix}.html" scrolling="auto"/>
             <frame name="docframe" src="{$index_path}" scrolling="auto"/>
             <frame name="docframe" src="{$index_path}" scrolling="auto"/>
         </frameset>
         </frameset>
 
 
@@ -168,7 +178,7 @@
         <!-- TOC -->
         <!-- TOC -->
         <xsl:if test="$multiple.libraries">
         <xsl:if test="$multiple.libraries">
             
             
-            <xsl:variable name="toc_path" select="'toc.html'"/>
+            <xsl:variable name="toc_path" select="concat( 'toc', $release_postfix, '.html' )"/>
             <xsl:message>Writing document <xsl:value-of select="$toc_path"/></xsl:message>
             <xsl:message>Writing document <xsl:value-of select="$toc_path"/></xsl:message>
 
 
             <exsl:document href="{$toc_path}" 
             <exsl:document href="{$toc_path}" 
@@ -200,7 +210,7 @@
                     <xsl:sort select="." order="ascending" />
                     <xsl:sort select="." order="ascending" />
                     <xsl:variable name="library_page" select="meta:encode_path(.)" />
                     <xsl:variable name="library_page" select="meta:encode_path(.)" />
                     <div class="toc-entry">
                     <div class="toc-entry">
-                        <a href="{$library_page}.html" class="toc-entry" target="_top">
+                        <a href="{$library_page}{$release_postfix}.html" class="toc-entry" target="_top">
                             <xsl:value-of select="."/>
                             <xsl:value-of select="."/>
                         </a>
                         </a>
                     </div>
                     </div>
@@ -212,12 +222,12 @@
         </xsl:if> 
         </xsl:if> 
          
          
         <!-- Libraries -->
         <!-- Libraries -->
-        <xsl:for-each select="$libraries">
+        <xsl:for-each select="$libraries[ meta:show_library( ., $release )]">
             <xsl:sort select="." order="ascending" />
             <xsl:sort select="." order="ascending" />
             <xsl:variable name="library" select="." />
             <xsl:variable name="library" select="." />
             
             
-            <xsl:variable name="library_results" select="concat( meta:encode_path( $library ), '_.html' )"/>
-            <xsl:variable name="library_page" select="concat( meta:encode_path( $library ), '.html' )"/>
+            <xsl:variable name="library_results" select="concat( meta:encode_path( $library ), $release_postfix, '_.html' )"/>
+            <xsl:variable name="library_page" select="concat( meta:encode_path( $library ), $release_postfix, '.html' )"/>
 
 
             <!-- Library page -->
             <!-- Library page -->
             <xsl:message>Writing document <xsl:value-of select="$library_page"/></xsl:message>
             <xsl:message>Writing document <xsl:value-of select="$library_page"/></xsl:message>
@@ -234,7 +244,7 @@
                     <title>Boost regression: <xsl:value-of select="$library"/>/<xsl:value-of select="$source"/></title>
                     <title>Boost regression: <xsl:value-of select="$library"/>/<xsl:value-of select="$source"/></title>
                 </head>
                 </head>
                 <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
                 <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
-                <frame name="tocframe" src="toc.html" scrolling="auto"/>
+                <frame name="tocframe" src="toc{$release_postfix}.html" scrolling="auto"/>
                 <frame name="docframe" src="{$library_results}" scrolling="auto"/>
                 <frame name="docframe" src="{$library_results}" scrolling="auto"/>
                 </frameset>
                 </frameset>
                 </html>
                 </html>
@@ -565,7 +575,7 @@
             </xsl:variable>
             </xsl:variable>
 
 
             
             
-            <xsl:if test="count( $test_result_for_toolset ) > 0 and $log_file != ''">
+            <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>
                 <xsl:message>Writing log file document  <xsl:value-of select="$log_file"/></xsl:message>
                     <exsl:document href="{$log_file}"
                     <exsl:document href="{$log_file}"
                         method="html" 
                         method="html" 

+ 15 - 4
tools/regression/xsl_reports/xsl/v2/summary_page.xsl

@@ -33,6 +33,7 @@
     <xsl:param name="run_date"/>
     <xsl:param name="run_date"/>
     <xsl:param name="comment_file"/>
     <xsl:param name="comment_file"/>
     <xsl:param name="explicit_markup_file"/>
     <xsl:param name="explicit_markup_file"/>
+    <xsl:param name="release"/>
 
 
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
 
 
@@ -47,7 +48,7 @@
     <!--<xsl:variable name="expected_results" select="document( $expected_results_file )" />-->
     <!--<xsl:variable name="expected_results" select="document( $expected_results_file )" />-->
 
 
     <!-- runs / toolsets -->
     <!-- runs / toolsets -->
-    <xsl:variable name="run_toolsets" select="meta:test_structure( / )"/>
+    <xsl:variable name="run_toolsets" select="meta:test_structure( /, $release )"/>
 
 
     <!-- libraries -->
     <!-- libraries -->
 
 
@@ -55,17 +56,23 @@
     <xsl:variable name="libraries" select="set:distinct( $test_case_logs/@library )"/>
     <xsl:variable name="libraries" select="set:distinct( $test_case_logs/@library )"/>
 
 
     <xsl:variable name="sorted_libraries_output">
     <xsl:variable name="sorted_libraries_output">
-        <xsl:for-each select="$libraries">
+        <xsl:for-each select="$libraries[ meta:show_library( ., $release )]">
             <xsl:sort select="." order="ascending" />
             <xsl:sort select="." order="ascending" />
             <library><xsl:copy-of select="."/></library>
             <library><xsl:copy-of select="."/></library>
         </xsl:for-each>
         </xsl:for-each>
     </xsl:variable>
     </xsl:variable>
 
 
     <xsl:variable name="sorted_libraries" select="exsl:node-set( $sorted_libraries_output )/library/@library"/>
     <xsl:variable name="sorted_libraries" select="exsl:node-set( $sorted_libraries_output )/library/@library"/>
+
+    <xsl:variable name="release_postfix">
+        <xsl:if test="$release='yes'">
+            <xsl:text>_release</xsl:text>
+        </xsl:if>
+    </xsl:variable>
      
      
     <xsl:template match="/">
     <xsl:template match="/">
 
 
-        <xsl:variable name="summary_results" select="'summary_.html'"/>
+        <xsl:variable name="summary_results" select="concat( 'summary_', $release_postfix, '.html' )"/>
 
 
         <!-- Summary page -->
         <!-- Summary page -->
         <html>
         <html>
@@ -103,6 +110,10 @@
                 <b>Report Time: </b> <xsl:value-of select="$run_date"/>
                 <b>Report Time: </b> <xsl:value-of select="$run_date"/>
             </div>
             </div>
 
 
+            Unusable: <xsl:value-of select="count( $test_case_logs[ meta:test_case_status( . ) = 'unusable' ] )"/>
+            Fail-unexepected: <xsl:value-of select="count( $test_case_logs[ meta:test_case_status( . ) = 'fail-unexpected' ] )"/>
+            fail-unexpected-new: <xsl:value-of select="count( $test_case_logs[ meta:test_case_status( . ) = 'fail-unexpected-new' ] )"/>
+
             <!-- summary table -->
             <!-- summary table -->
 
 
             <table border="0" cellspacing="0" cellpadding="0" width="1%" class="summary-table" summary="Overall summary">
             <table border="0" cellspacing="0" cellpadding="0" width="1%" class="summary-table" summary="Overall summary">
@@ -138,7 +149,7 @@
                     <xsl:variable name="expected_test_count" select="count( $current_row[ generate-id(.) = generate-id( key('test_name_key',@test-name)[1] ) ] )"/>
                     <xsl:variable name="expected_test_count" select="count( $current_row[ generate-id(.) = generate-id( key('test_name_key',@test-name)[1] ) ] )"/>
                     <xsl:variable name="library_header">
                     <xsl:variable name="library_header">
                         <td class="library-name">
                         <td class="library-name">
-                            <a href="{$library_page}.html" class="library-link" target="_top">
+                            <a href="{$library_page}{$release_postfix}.html" class="library-link" target="_top">
                                 <xsl:value-of select="$library"/>
                                 <xsl:value-of select="$library"/>
                             </a>
                             </a>
                         </td>
                         </td>

粤ICP备19079148号