Browse Source

Performance improvements

[SVN r28924]
Misha Bergal 21 years ago
parent
commit
c29909a5c7

+ 12 - 1
tools/regression/xsl_reports/xsl/v2/common.xsl

@@ -134,7 +134,8 @@ http://www.boost.org/LICENSE_1_0.txt)
         <func:result select="$test_log/@test-type='compile' or $test_log/@test-type='compile_fail' or $test_log/@test-type='run' or $test_log/@test-type='run_pyd'"/>
     </func:function>
 
-    <func:function name="meta:is_unusable">
+
+    <func:function name="meta:is_unusable_">
         <xsl:param name="explicit_markup"/>
         <xsl:param name="library"/>
         <xsl:param name="toolset"/>
@@ -142,6 +143,16 @@ http://www.boost.org/LICENSE_1_0.txt)
         <func:result select="count( $explicit_markup//library[ @name = $library ]/mark-unusable/toolset[ meta:re_match( @name, $toolset ) ] ) > 0"/>
     </func:function>
 
+    <func:function name="meta:is_unusable">
+        <xsl:param name="explicit_markup"/>
+        <xsl:param name="library"/>
+        <xsl:param name="toolset"/>
+          
+        <xsl:for-each select="$unusables">
+            <func:result select="count( key( 'library-name_toolset-name_key', concat( $library, '&gt;@&lt;', $toolset ) ) ) &gt; 0"/>
+        </xsl:for-each>
+    </func:function>
+
     <func:function name="meta:re_match">
         <xsl:param name="pattern"/>
         <xsl:param name="text"/>

+ 25 - 1
tools/regression/xsl_reports/xsl/v2/result_page.xsl

@@ -54,7 +54,27 @@ http://www.boost.org/LICENSE_1_0.txt)
 
     <xsl:variable name="test_case_logs" select="//test-log[ meta:is_test_log_a_test_case(.) ]"/>
     <xsl:variable name="libraries" select="set:distinct( $test_case_logs/@library )"/>
+    <xsl:variable name="unusables_f">
+        <unusables>
+            <xsl:for-each select="set:distinct( $run_toolsets//toolset/@name )">
+                <xsl:variable name="toolset" select="."/>
+                <xsl:for-each select="$libraries">
+                    <xsl:variable name="library" select="."/>
+                    <xsl:if test="meta:is_unusable_( $explicit_markup, $library, $toolset )">
+                        <unusable library-name="{$library}" toolset-name="{$toolset}"/>                            
+                    </xsl:if>
+                </xsl:for-each>
+            </xsl:for-each>
+        </unusables>
+    </xsl:variable>
 
+    <xsl:variable name="unusables" select="exsl:node-set( $unusables_f )"/>
+
+        
+    <xsl:key 
+        name="library-name_toolset-name_key" 
+        match="unusables/unusable" 
+        use="concat( @library-name, '&gt;@&lt;', @toolset-name )"/>
 
     <!-- modes -->
 
@@ -92,6 +112,8 @@ http://www.boost.org/LICENSE_1_0.txt)
 
     <xsl:template match="/">
 
+        <xsl:message><xsl:value-of select="count($unusables)"/><xsl:copy-of select="$unusables"/></xsl:message>
+        
         <exsl:document href="debug.xml" 
           method="xml" 
           encoding="utf-8"
@@ -103,10 +125,12 @@ http://www.boost.org/LICENSE_1_0.txt)
                         <xsl:copy-of select="."/>
                     </xsl:for-each>
                 </runs>
+                <xsl:copy-of select="$unusables_f"/>
+                <xsl:copy-of select="$unusables"/>
             </debug>
 
         </exsl:document>
-
+        <xsl:message>Wrote debug</xsl:message>
         <xsl:variable name="index_path" select="concat( 'index_', $release_postfix, '.html' )"/>
         
         <!-- Index page -->

+ 20 - 0
tools/regression/xsl_reports/xsl/v2/summary_page.xsl

@@ -45,6 +45,26 @@ http://www.boost.org/LICENSE_1_0.txt)
     <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
     <xsl:key name="test_name_key"  match="test-log" use="@test-name "/>
 
+    <xsl:variable name="unusables_f">
+            <xsl:for-each select="set:distinct( $run_toolsets//toolset/@name )">
+                <xsl:variable name="toolset" select="."/>
+                <xsl:for-each select="$libraries">
+                    <xsl:variable name="library" select="."/>
+                    <xsl:if test="meta:is_unusable_( $explicit_markup, $library, $toolset )">
+                        <unusable library-name="{$library}" toolset-name="{$toolset}"/>                            
+                    </xsl:if>
+                </xsl:for-each>
+            </xsl:for-each>
+    </xsl:variable>
+
+    <xsl:variable name="unusables" select="exsl:node-set( $unusables_f )"/>
+
+        
+    <xsl:key 
+        name="library-name_toolset-name_key" 
+        match="unusable" 
+        use="concat( @library-name, '&gt;@&lt;', @toolset-name )"/>
+
     <!--<xsl:variable name="expected_results" select="document( $expected_results_file )" />-->
 
     <!-- runs / toolsets -->

粤ICP备19079148号