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

Loosen up incomplete XML check (see http://article.gmane.org/gmane.comp.lib.boost.devel/153281)

[SVN r36745]
Aleksey Gurtovoy 19 лет назад
Родитель
Сommit
ebfa266d58

+ 1 - 1
tools/regression/xsl_reports/test/common.py

@@ -75,7 +75,7 @@ def make_test_log( xml_generator
             xml_generator.characters( "Linking in %s" % target_directory )
             xml_generator.endElement( "link" )
 
-        if test_type.find( "run" ) == 0 and toolset_idx % 4:
+        if test_type.find( "run" ) == 0 and ( toolset_idx + 2 ) % 4:
             xml_generator.startElement( "run", { "result": test_result } );
             xml_generator.characters( "Running in %s" % target_directory )
             xml_generator.endElement( "run" )

+ 5 - 4
tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl

@@ -29,8 +29,8 @@ http://www.boost.org/LICENSE_1_0.txt)
         <xsl:param name="test_log"/>
         <xsl:variable name="type" select="$test_log/@test-type"/>
         <func:result select="( ( $type='compile' or $type='compile_fail' ) and count( $test_log/compile ) > 0 )
-                          or ( ( $type='link' or $type='link_fail' ) and count( $test_log/compile ) > 0 and count( $test_log/link ) > 0 )
-                          or ( count( $test_log/compile ) > 0 and count( $test_log/link ) > 0 and count( $test_log/run ) > 0 )
+                          or ( ( $type='link' or $type='link_fail' ) and count( $test_log/link ) > 0 )
+                          or ( count( $test_log/run ) > 0 )
                           "/>
     </func:function>
 
@@ -54,9 +54,10 @@ http://www.boost.org/LICENSE_1_0.txt)
         <xsl:element name="{local-name()}">
             <xsl:apply-templates select="@*"/>
 
+            <xsl:variable name="has_failures" select="./*/@result = 'fail'"/>
             <xsl:variable name="actual_result">
                 <xsl:choose>
-                    <xsl:when test="./*/@result = 'fail' or not( $is_complete )" >
+                    <xsl:when test="$has_failures or not( $is_complete )" >
                         <xsl:text>fail</xsl:text>
                     </xsl:when>
                     <xsl:otherwise>
@@ -216,7 +217,7 @@ http://www.boost.org/LICENSE_1_0.txt)
                         </xsl:choose>
                     </xsl:if>
 
-                    <xsl:if test="not( $is_complete )">
+                    <xsl:if test="not( $is_complete ) and not( $has_failures )">
                         <note>
                             <span class="internal-error-note">
                                 <b>[Reporting Tools Internal Error]</b> This test case's XML is missing one or more log entries

粤ICP备19079148号