Browse Source

show notes for 'unexpected success' cells

[SVN r25551]
Aleksey Gurtovoy 21 years ago
parent
commit
e2ae6b74dd

+ 62 - 20
tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl

@@ -54,6 +54,7 @@ http://www.boost.org/LICENSE_1_0.txt)
         <xsl:variable name="expected_results_test_case" select="$expected_results//*/test-result[ @library=$library and ( @test-name=$test-name or @test-name='*' ) and @toolset = $toolset]"/>
         <xsl:variable name="test_failures_markup" select="$failures_markup//library[@name=$library]/test[ meta:re_match( @name, $test-name ) ]/mark-failure/toolset[ meta:re_match( @name, $toolset ) ]/.."/>
         <xsl:variable name="test_failures_markup2" select="$failures_markup//library[@name=$library]/mark-expected-failures/test[ meta:re_match( @name, $test-name ) ]/../toolset[ meta:re_match( @name, $toolset ) ]/.."/>
+
         <xsl:variable name="is_new">
             <xsl:choose>
                 <xsl:when test="$expected_results_test_case">
@@ -63,9 +64,11 @@ http://www.boost.org/LICENSE_1_0.txt)
             </xsl:choose>
         </xsl:variable>
 
+        <xsl:variable name="has_explicit_markup" select="count( $test_failures_markup ) > 0 or count( $test_failures_markup2 ) > 0"/>
+
         <xsl:variable name="expected_result">
             <xsl:choose>
-            <xsl:when test="count( $test_failures_markup ) > 0 or count( $test_failures_markup2 ) > 0">
+            <xsl:when test="$has_explicit_markup">
                 <xsl:text>fail</xsl:text>
             </xsl:when>
               
@@ -83,40 +86,79 @@ http://www.boost.org/LICENSE_1_0.txt)
 
         <xsl:variable name="status">
             <xsl:choose>
-            <xsl:when test="count( $test_failures_markup ) > 0 or count( $test_failures_markup2 ) > 0">
-                <xsl:choose>
-                <xsl:when test="$expected_result = $actual_result">expected</xsl:when>
-                <xsl:otherwise>unexpected</xsl:otherwise>
-                </xsl:choose>
-            </xsl:when>
-
-            <xsl:otherwise>
-                <xsl:choose>
-                <xsl:when test="$expected_result = $actual_result">expected</xsl:when>
-                <xsl:otherwise>unexpected</xsl:otherwise>
-                </xsl:choose>
-            </xsl:otherwise>
-              
+            <xsl:when test="$expected_result = $actual_result">expected</xsl:when>
+            <xsl:otherwise>unexpected</xsl:otherwise>
             </xsl:choose>
         </xsl:variable>
 
+        <xsl:variable name="unexpected_success" select="$status = 'unexpected' and $actual_result = 'success'"/>
+
         <xsl:variable name="notes">
 
+            <xsl:if test="$unexpected_success and $has_explicit_markup">
+                <note>
+                    <span class="auto-note">
+                    This test case was explicitly marked up in 
+                    <a href="http://cvs.sourceforge.net/viewcvs.py/boost/boost/status/explicit-failures-markup.xml">
+                    status/explicit-failures-markup.xml</a> file in the Boost CVS as "expected to fail",
+                    but is passing. Please consult the notes/output below for more details.
+                    </span>
+                </note>
+            </xsl:if>
+
+            <xsl:if test="$has_explicit_markup and count( $test_failures_markup2/note ) = 0 and count( $test_failures_markup/note ) = 0">
+                <xsl:choose>
+                <xsl:when test="$unexpected_success">
+                    <note>
+                        <span class="auto-note">
+                        No explanation was provided for this markup. Please contact the library 
+                        author(s)/maintainer(s) for more details.
+                        </span>
+                    </note>
+                </xsl:when>
+                <xsl:otherwise>
+                    <note>
+                        <span class="auto-note">
+                        This failure was explicitly marked as expected in 
+                        <a href="http://cvs.sourceforge.net/viewcvs.py/boost/boost/status/explicit-failures-markup.xml">
+                        status/explicit-failures-markup.xml</a> file in the Boost CVS. 
+                        Please contact the library author(s)/maintainer(s) for the explanation of this markup.
+                        </span>
+                    </note>
+                </xsl:otherwise>
+                </xsl:choose>
+            </xsl:if>
+
             <xsl:if test="count( $test_failures_markup ) > 0">
                 <xsl:for-each select="$test_failures_markup/note">
-                <xsl:copy-of select="."/>
+                    <xsl:copy-of select="."/>
                 </xsl:for-each>
             </xsl:if>
 
             <xsl:if test="count( $test_failures_markup2 ) > 0">
                 <xsl:for-each select="$test_failures_markup2/note">
-                <xsl:copy-of select="."/>
+                    <xsl:copy-of select="."/>
                 </xsl:for-each>
             </xsl:if>
-              
+
+
             <xsl:if test="$expected_results_test_case and $expected_results_test_case/@result = 'fail'">
-                <note>This failure was present in the reference ("last-known-good") release.
-                </note>
+                <xsl:choose>
+                <xsl:when test="$unexpected_success">
+                    <note>
+                        <span class="auto-note">
+                        This test case used to fail in the reference ("last-known-good") release.
+                        </span>
+                    </note>
+                </xsl:when>
+                <xsl:otherwise>
+                    <note>
+                        <span class="auto-note">
+                        This failure was present in the reference ("last-known-good") release.
+                        </span>
+                    </note>
+                </xsl:otherwise>
+                </xsl:choose>
             </xsl:if>
             
         </xsl:variable>

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

@@ -17,7 +17,7 @@ http://www.boost.org/LICENSE_1_0.txt)
     xmlns:set="http://exslt.org/sets"
     xmlns:meta="http://www.meta-comm.com"
     extension-element-prefixes="func"
-    exclude-result-prefixes="exsl func str meta"
+    exclude-result-prefixes="exsl func str set meta"
     version="1.0">
 
     <xsl:variable name="output_directory" select="'output'"/>
@@ -200,9 +200,12 @@ http://www.boost.org/LICENSE_1_0.txt)
     </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'"/>
+        <xsl:param name="explicit_markup"/>
+        <xsl:param name="test_log"/>
+        <func:result select="( $test_log/@result != 'success' or $test_log/@show-run-output = 'true' or
+                                $test_log/@result = 'success'  and $test_log/@status = 'unexpected' )
+                            and not( meta:is_unusable( $explicit_markup, $test_log/@library, $test_log/@toolset ) )
+                            "/>
     </func:function>
 
     <func:function name="meta:show_toolset">

+ 15 - 3
tools/regression/xsl_reports/xsl/v2/html/master.css

@@ -167,7 +167,6 @@ table.summary-table
 ,a.log-link:visited
 {
      color: black; 
-/*  text-decoration: none; */
 }
 
  a.log-link:active
@@ -275,13 +274,22 @@ td.summary-unknown-status
     width: 60pt;
     text-align: center;
     background-color: green;
-    font-weight: bold;
     color: white;
     border: 0px;
     padding-left: 2pt;
     padding-right: 2pt;
 }
 
+
+ td.library-success-unexpected a.log-link:link
+,td.library-success-unexpected a.log-link:visited
+,td.library-success-unexpected a.log-link:active
+,td.library-success-unexpected a.log-link:hover
+{
+     color: white;
+}
+
+
   td.summary-unusable
 , td.library-unusable
 {
@@ -478,12 +486,16 @@ div.note
     padding: 3pt;
 }
 
-
 span.note-header
 {
     font-weight: bold;
 }
 
+span.auto-note
+{
+    font-style: italic;
+}
+
 /* Log */
 
 div.log-test-title

+ 4 - 4
tools/regression/xsl_reports/xsl/v2/links_page.xsl

@@ -85,7 +85,7 @@ http://www.boost.org/LICENSE_1_0.txt)
               
             <xsl:if test="compile">
                 <p>
-                <div class="log-compiler-output-title">Compiler output [<xsl:value-of select="@timestamp"/>]:
+                <div class="log-compiler-output-title">Compiler output [<xsl:value-of select="compile/@timestamp"/>]:
                 </div>
                 <pre>
                     <xsl:copy-of select="compile/node()"/>
@@ -95,7 +95,7 @@ http://www.boost.org/LICENSE_1_0.txt)
               
             <xsl:if test="link">
                 <p>
-                <div class="log-linker-output-title">Linker output [<xsl:value-of select="@timestamp"/>]:</div>
+                <div class="log-linker-output-title">Linker output [<xsl:value-of select="link/@timestamp"/>]:</div>
                 <pre>
                     <xsl:copy-of select="link/node()"/>
                 </pre>
@@ -104,7 +104,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 
             <xsl:if test="lib">
                 <p>
-                <div class="log-linker-output-title">Lib output [<xsl:value-of select="@timestamp"/>]:</div>
+                <div class="log-linker-output-title">Lib output [<xsl:value-of select="lib/@timestamp"/>]:</div>
                 <p>
                     See <a href="{meta:encode_path( concat( ../@runner, '-',  lib/node() )  ) }.html">
                     <xsl:copy-of select="lib/node()"/>
@@ -115,7 +115,7 @@ http://www.boost.org/LICENSE_1_0.txt)
               
             <xsl:if test="run">
                 <p>
-                <div class="log-run-output-title">Run output [<xsl:value-of select="@timestamp"/>]:</div>
+                <div class="log-run-output-title">Run output [<xsl:value-of select="run/@timestamp"/>]:</div>
                 <pre>
                     <xsl:copy-of select="run/node()"/>
                 </pre>

粤ICP备19079148号