Przeglądaj źródła

better handling for dependencies failures

[SVN r21900]
Aleksey Gurtovoy 22 lat temu
rodzic
commit
7323f7b9cf

+ 39 - 11
tools/regression/xsl_reports/xsl/links_page.xsl

@@ -13,7 +13,11 @@
 
      -->
 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:func="http://exslt.org/functions"
+  xmlns:meta="http://www.meta-comm.com"
+  extension-element-prefixes="func"
+  version="1.0">
 
   <xsl:import href="common.xsl"/>
 
@@ -67,20 +71,37 @@
           </table>
         </div>
         <div>
-          <xsl:apply-templates select="//test-log[@result = 'fail']"/>
+          <xsl:apply-templates select="//test-log[@test-name != '' and @result = 'fail']"/>
         </div>
+        <div>
+          <xsl:apply-templates select="//test-log[@test-name = '' and @result = 'fail']" />
+        </div>
+
       </body>
     </html>
   </xsl:template>
 
+
   <xsl:template match="test-log">
     <div>
-      <xsl:variable name="test-anchor">
-        <xsl:value-of select="concat( @test-name, '-', @toolset )"/>
-      </xsl:variable>
-      <div class="log-test-title">
-        <a name="{$test-anchor}"><xsl:value-of select="concat( @test-name, ' / ', @toolset )"/></a>
-      </div>
+      <xsl:choose>
+        <xsl:when test="@test-name != ''">
+          <xsl:variable name="test-anchor">
+            <xsl:value-of select="concat( @library, '-', @test-name, '-', @toolset )"/>
+          </xsl:variable>
+          <div class="log-test-title">
+            <a name="{$test-anchor}"><xsl:value-of select="concat( @library, ' - ', @test-name, ' / ', @toolset )"/></a>
+          </div>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:variable name="test-anchor">
+            <xsl:value-of select="meta:path-to-anchor( @target-directory )"/>
+          </xsl:variable>
+          <div class="log-test-title">
+            <a name="{$test-anchor}"><xsl:value-of select="@target-directory"/></a>
+          </div>
+        </xsl:otherwise>
+      </xsl:choose>
 
     <xsl:if test="notes/note">
       <p>
@@ -113,9 +134,11 @@
     <xsl:if test="lib">
       <p>
         <div class="log-linker-output-title">Lib &#160;output:</div>
-        <pre>
-          <xsl:copy-of select="lib/node()"/>
-        </pre>
+        <p>
+          See <a href="#{meta:path-to-anchor( lib/node() )}">
+            <xsl:copy-of select="lib/node()"/>
+          </a>
+        </p>
       </p>
     </xsl:if>
 
@@ -132,5 +155,10 @@
 
   </xsl:template>
 
+  <func:function name="meta:path-to-anchor">
+      <xsl:param name="path"/>
+      <func:result select="translate( $path, '/', '-' )"/>
+  </func:function>
+  
 
 </xsl:stylesheet>

+ 7 - 2
tools/regression/xsl_reports/xsl/result_page.xsl

@@ -345,6 +345,7 @@
                 <!-- general tests section -->
 
                 <xsl:call-template name="insert_test_section">
+                    <xsl:with-param name="library" select="$library"/>
                     <xsl:with-param name="section_tests" select="$lib_general_tests"/>
                     <xsl:with-param name="lib_tests" select="$lib_tests"/>
                     <xsl:with-param name="toolsets" select="$ordered_toolsets"/>
@@ -360,6 +361,7 @@
                     </tr>
 
                 <xsl:call-template name="insert_test_section">
+                    <xsl:with-param name="library" select="$library"/>
                     <xsl:with-param name="section_tests" select="$lib_corner_case_tests"/>
                     <xsl:with-param name="lib_tests" select="$lib_tests"/>
                     <xsl:with-param name="toolsets" select="$ordered_toolsets"/>
@@ -522,6 +524,7 @@
   </xsl:template>
 
   <xsl:template name="insert-test-line">
+    <xsl:param name="library"/>    
     <xsl:param name="test_name"/>
     <xsl:param name="test_results"/>
     <xsl:param name="toolsets"/>
@@ -551,13 +554,13 @@
           <xsl:when test="$mode='user'">
             <xsl:call-template name="insert_cell_user">
               <xsl:with-param name="test_log" select="$test_result_for_toolset"/>
-              <xsl:with-param name="log_link" select="concat( $links_file, '#', $test_name, '-', $toolset )"/>
+              <xsl:with-param name="log_link" select="concat( $links_file, '#', $library, '-', $test_name, '-', $toolset )"/>
             </xsl:call-template>
           </xsl:when>
           <xsl:when test="$mode='developer'">
             <xsl:call-template name="insert_cell_developer">
               <xsl:with-param name="test_log" select="$test_result_for_toolset"/>
-              <xsl:with-param name="log_link" select="concat( $links_file, '#', $test_name, '-', $toolset )"/>
+              <xsl:with-param name="log_link" select="concat( $links_file, '#',  $library, '-', $test_name, '-', $toolset )"/>
             </xsl:call-template>
           </xsl:when>
         </xsl:choose>
@@ -568,6 +571,7 @@
   </xsl:template>
 
   <xsl:template name="insert_test_section">
+      <xsl:param name="library"/>      
       <xsl:param name="section_tests"/>
       <xsl:param name="lib_tests"/>
       <xsl:param name="toolsets"/>
@@ -592,6 +596,7 @@
           </xsl:variable>
           
           <xsl:call-template name="insert-test-line">
+              <xsl:with-param name="library" select="$library"/>
               <xsl:with-param name="test_results" select="$lib_tests[ @test-name = $test_name ]"/>
               <xsl:with-param name="toolsets" select="$toolsets"/>
               <xsl:with-param name="test_name" select="$test_name"/>

粤ICP备19079148号