Misha Bergal 22 лет назад
Родитель
Сommit
f26a8146d6

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

@@ -59,7 +59,15 @@
          </xsl:choose>
       </xsl:variable>
 
-      
+      <xsl:variable name="show_run_output">
+         <xsl:choose>
+            <xsl:when test="@show-run-output = 'true' ">
+                <xsl:text>yes</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>no</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
       <xsl:variable name="expected_result">
         <xsl:choose>
           <xsl:when test='count( $failures_markup ) &gt; 0'>
@@ -114,6 +122,7 @@
       <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>
+      <xsl:attribute name="show-run-output"><xsl:value-of select="$show_run_output"/></xsl:attribute>
       <!--<a><xsl:value-of select="count( $failures_markup )"/></a>-->
       <xsl:element name="notes"><xsl:copy-of select="$notes"/></xsl:element>
 

+ 8 - 3
tools/regression/xsl_reports/xsl/v2/common.xsl

@@ -16,7 +16,7 @@
   extension-element-prefixes="func"
   version="1.0">
 
-  <xsl:variable name="output_directory" select="'output'"/>
+    <xsl:variable name="output_directory" select="'output'"/>
 
   <func:function name="meta:test_structure">
     <xsl:param name="document"/>
@@ -28,7 +28,7 @@
         <xsl:for-each select="$runs">
           <run runner="{@runner}" timestamp="{@timestamp}">
             <comment><xsl:value-of select="comment"/></comment>
-            <xsl:variable name="not_ordered_toolsets" select="set:distinct( //test-log/@toolset )"/>
+            <xsl:variable name="not_ordered_toolsets" select="set:distinct( //test-log[ meta:is_test_log_a_test_case(.) ]/@toolset )"/>
             <xsl:for-each select="$not_ordered_toolsets">
               <xsl:sort select="." order="ascending"/>
               <xsl:variable name="toolset" select="."/>
@@ -95,6 +95,11 @@
       <func:result select="translate( translate( $path, '/', '-' ), './', '-' )"/>
   </func:function>
 
+    <func:function name="meta:toolset_name">
+        <xsl:param name="name"/>
+        <func:result select="$name"/>
+    </func:function>
+
   <func:function name="meta:output_file_path">
       <xsl:param name="path"/>
       <func:result select="concat( $output_directory, '/', meta:encode_path( $path ), '.html' )"/>
@@ -113,7 +118,7 @@
       <tr>
           <td colspan="{$colspan}">&#160;</td>
           <xsl:for-each select="$run_toolsets/runs/run">
-              <td colspan="{count(toolset)}" class="runner"><a href="{@runner}.html"><xsl:value-of select="@runner"/></a></td>
+              <td colspan="{count(toolset)}" class="runner"><a href="../{@runner}.html"><xsl:value-of select="@runner"/></a></td>
           </xsl:for-each>
       </tr>
 

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

@@ -32,10 +32,10 @@
 
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
 
-    <xsl:template match="test-log">
-        <xsl:variable name="document_path" select="meta:output_file_path( @target-directory )"/>
+    <xsl:template match="test-log[ @result != 'success' or @show-run-output = 'yes' ]">
+        <xsl:variable name="document_path" select="meta:output_file_path( concat( ../@runner, '-', @target-directory ) )"/>
 
-        <xsl:message>Writing document <xsl:value-of select="$document_path"/></xsl:message>
+        <xsl:message>Writing log file document <xsl:value-of select="$document_path"/></xsl:message>
 
         <exsl:document href="{$document_path}" 
         method="html" 
@@ -101,7 +101,7 @@
                 <p>
                 <div class="log-linker-output-title">Lib output:</div>
                 <p>
-                    See <a href="{meta:encode_path( lib/node() )}.html">
+                    See <a href="{meta:encode_path( concat( ../@runner, '-',  lib/node() )  ) }.html">
                     <xsl:copy-of select="lib/node()"/>
                     </a>
                 </p>

+ 2 - 3
tools/regression/xsl_reports/xsl/v2/runners.xsl

@@ -18,6 +18,7 @@
     <table>
       <tr>
         <td>
+            <xsl:message>Writing runner document <xsl:value-of select="@runner"/></xsl:message>
           <a href="{@runner}.html"><xsl:value-of select="@runner"/></a>
           <exsl:document href="{@runner}.html"
             method="html" 
@@ -37,8 +38,6 @@
           </exsl:document>
         </td>     
       </tr>
-    </table>
-       <xsl:message>Writing document</xsl:message>
-    
+    </table>    
   </xsl:template>
 </xsl:stylesheet>

粤ICP备19079148号