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

workaround xsltproc(?)/XPath bug

[SVN r25241]
Aleksey Gurtovoy 21 лет назад
Родитель
Сommit
2862884f7d
1 измененных файлов с 8 добавлено и 10 удалено
  1. 8 10
      tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl

+ 8 - 10
tools/regression/xsl_reports/xsl/v2/add_expected_results.xsl

@@ -52,8 +52,8 @@ http://www.boost.org/LICENSE_1_0.txt)
         </xsl:variable>
 
         <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="new_failures_markup" select="$failures_markup//library[@name=$library]/mark-expected-failures[ meta:re_match( test/@name, $test-name ) and meta:re_match( toolset/@name, $toolset ) ]"/>
-        <xsl:variable name="failures_markup" select="$failures_markup//library[@name=$library]/test[ meta:re_match( @name, $test-name ) ]/mark-failure[ meta:re_match( toolset/@name, $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">
@@ -65,7 +65,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 
         <xsl:variable name="expected_result">
             <xsl:choose>
-            <xsl:when test='count( $failures_markup ) &gt; 0 or count( $new_failures_markup ) &gt; 0'>
+            <xsl:when test='count( $test_failures_markup ) > 0 or count( $test_failures_markup2 ) > 0'>
                 <xsl:text>fail</xsl:text>
             </xsl:when>
               
@@ -83,7 +83,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 
         <xsl:variable name="status">
             <xsl:choose>
-            <xsl:when test="count( $failures_markup ) &gt; 0 or count( $new_failures_markup ) &gt; 0">
+            <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>
@@ -103,14 +103,14 @@ http://www.boost.org/LICENSE_1_0.txt)
         <xsl:variable name="notes">
             <xsl:choose>
 
-            <xsl:when test='count( $failures_markup ) &gt; 0'>
-                <xsl:for-each select="$failures_markup/note">
+            <xsl:when test='count( $test_failures_markup ) > 0'>
+                <xsl:for-each select="$test_failures_markup/note">
                 <xsl:copy-of select="."/>
                 </xsl:for-each>
             </xsl:when>
 
-            <xsl:when test='count( $new_failures_markup ) &gt; 0'>
-                <xsl:for-each select="$new_failures_markup/note">
+            <xsl:when test='count( $test_failures_markup2 ) > 0'>
+                <xsl:for-each select="$test_failures_markup2/note">
                 <xsl:copy-of select="."/>
                 </xsl:for-each>
             </xsl:when>
@@ -122,10 +122,8 @@ http://www.boost.org/LICENSE_1_0.txt)
         <xsl:attribute name="expected-result"><xsl:value-of select="$expected_result"/></xsl:attribute>
         <xsl:attribute name="status"><xsl:value-of select="$status"/></xsl:attribute>
         <xsl:attribute name="is-new"><xsl:value-of select="$is_new"/></xsl:attribute>
-        <!--<a><xsl:value-of select="count( $failures_markup )"/></a>-->
         <xsl:element name="notes"><xsl:copy-of select="$notes"/></xsl:element>
 
-
         <xsl:apply-templates select="node()" />
         </xsl:element>
     </xsl:template>

粤ICP备19079148号