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

Initial merger shreds

[SVN r23664]
Misha Bergal 22 лет назад
Родитель
Сommit
e8f44ac84f

+ 108 - 0
tools/regression/xsl_reports/merger/test/generate_test_results.py

@@ -0,0 +1,108 @@
+import xml.sax.saxutils
+
+import os
+
+number_of_libs = 2
+number_of_runners = 2
+initial_number_of_toolsets = 3
+number_of_tests = 10
+
+tag = "1_30_0"
+
+def make_test_results():
+    if not os.path.exists( tag ):
+        os.makedirs( tag )
+    for i_runner in range( 0, number_of_runners ):
+        runner_id = "runner_%02d" % i_runner
+        g = xml.sax.saxutils.XMLGenerator( open( os.path.join( "1_30_0", runner_id + ".xml" ), "w" ) )
+        g.startElement( "all-test-runs", {} )
+        platform = "Win32"
+        g.startElement( "test-run", { "platform": platform, "runner": runner_id } )
+        for i_lib in range( 0, number_of_libs ):
+            library_name = "library_%02d" % i_lib
+            for i_toolset in range( initial_number_of_toolsets ):
+                toolset_name = "toolset_%02d" % ( i_toolset )
+                for i_test in range( number_of_tests ):
+                    test_name = "test_%02d_%02d" % ( i_lib, i_test )
+                    test_result = ""
+                    if i_runner % 2: test_result = "success"
+                    else:             test_result = "fail"
+                    make_test_log( g, library_name, toolset_name, test_name, test_result  )
+        g.endElement( "test-run" )
+
+def make_test_name( library_idx, test_idx ):
+    return "test_%02d_%02d" % ( library_idx, test_idx )
+
+def make_library_name( library_idx ):
+    return "library_%02d" % library_idx
+
+def make_toolset_name( toolset_idx ):
+    return "toolset_%02d" % toolset_idx
+
+def make_expicit_failure_markup():
+    g = xml.sax.saxutils.XMLGenerator( open( "explicit-failures-markup.xml", "w" ) )
+    g.startElement( "explicit-failures-markup", {} );
+
+    # required toolsets
+    for i_toolset in range( 0, initial_number_of_toolsets ):
+        if i_toolset < 2:
+            g.startElement( "mark-toolset", { "name": "toolset_%02d" % i_toolset, "status":"required"} )
+            g.endElement( "mark-toolset" )
+
+    for i_library in range( 0, number_of_libs ):
+        g.startElement( "library", { "name": make_library_name( i_library ) } )
+        if i_library % 4 == 0:
+            g.startElement( "mark-unusable", {} )
+            for i_toolset in range( 0, initial_number_of_toolsets ):
+                if i_toolset % 2 == 1:
+                    g.startElement( "toolset", { "name": make_toolset_name( i_toolset ) } )
+                    g.endElement( "toolset" )
+            g.startElement( "note", { "author": "T. Test" } )
+            g.characters( "Test note" )
+            g.endElement( "note" )
+            g.endElement( "mark-unusable" )
+
+        for i_test in range( 0, number_of_tests ):
+            if i_test > number_of_tests - 3:
+                g.startElement( "test", { "name": make_test_name( i_library, i_test ), "corner-case": "yes" } )
+                g.endElement( "test" );
+        g.endElement( "library" )
+            
+        
+    g.endElement( "explicit-failures-markup" )
+
+def make_test_log( g, library, toolset_name, test_name, test_result ):
+    g.startElement( "test-log", { "library": library
+                                  , "test-name":  test_name
+                                  , "toolset": toolset_name
+                                  , "test-type": "run"
+                                  , "test-program": "some_program"
+                                  , "target-directory": "some_directory"
+                                  , "show-run-output": "false"
+                                  } )
+    g.startElement( "run", { "result": test_result } );
+    g.endElement( "run" )
+    g.endElement( "test-log" )
+
+## <test-log library="algorithm" test-name="container" test-type="run" test-program="libs/algorithm/string/test/container_test.cpp" target-directory="bin/boost/libs/algorithm/string/test/container.test/borland-5.6.4/debug" toolset="borland-5.6.4" show-run-output="false">
+## <compile result="fail" timestamp="2004-06-29 17:02:27 UTC">
+
+##     "C:\Progra~1\Borland\CBuilder6\bin\bcc32"  -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b-   -v -Od -vi- -tWC -tWR -tWC -WM- -DBOOST_ALL_NO_LIB=1  -w-8001  -I"C:\Users\Administrator\boost\main\results\bin\boost\libs\algorithm\string\test"   -I"C:\Users\Administrator\boost\main\boost" -I"C:\Progra~1\Borland\CBuilder6\include"  -o"C:\Users\Administrator\boost\main\results\bin\boost\libs\algorithm\string\test\container.test\borland-5.6.4\debug\container_test.obj"  "..\libs\algorithm\string\test\container_test.cpp" 
+
+## ..\libs\algorithm\string\test\container_test.cpp:
+## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_result.cpp 323: template argument _InputIter passed to 'for_each' is a output iterator: input iterator required in function unit_test_result::~unit_test_result()
+## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_suite.cpp 63: template argument _InputIter passed to 'find_if' is a output iterator: input iterator required in function test_case::Impl::check_dependencies()
+## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_suite.cpp 204: template argument _InputIter passed to 'for_each' is a output iterator: input iterator required in function test_suite::~test_suite()
+## Error E2401 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 45: Invalid template argument list
+## Error E2040 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 46: Declaration terminated incorrectly
+## Error E2090 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 277: Qualifier 'algorithm' is not a class or namespace name
+## Error E2272 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 277: Identifier expected
+## Error E2090 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 278: Qualifier 'algorithm' is not a class or namespace name
+## Error E2228 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 278: Too many error or warning messages
+## *** 6 errors in Compile ***
+## </compile>
+## </test-log>
+        
+    
+make_test_results()
+make_expicit_failure_markup()

+ 136 - 0
tools/regression/xsl_reports/merger/xsl/add_expected_results.xsl

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ (C) Copyright MetaCommunications, Inc. 2003.
+
+ Permission to use, copy, modify, distribute and sell this software
+ and its documentation for any purpose is hereby granted without fee, 
+ provided that the above copyright notice appears in all copies and 
+ that both the copyright notice and this permission notice appear in 
+ supporting documentation. No representations are made about the 
+ suitability of this software for any purpose. It is provided "as is" 
+ without express or implied warranty.
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+  <xsl:output method="xml" encoding="utf-8"/>
+  
+  <xsl:param name="expected_results_file"/>
+  <xsl:param name="failures_markup_file"/>
+  <xsl:variable name="expected_results" select="document( $expected_results_file )" />
+  <xsl:variable name="failures_markup" select="document( $failures_markup_file )" />
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  <xsl:template match="test-log">
+    <xsl:variable name="library" select="@library"/>
+    <xsl:variable name="test-name" select="@test-name"/>
+    <xsl:variable name="toolset" select="@toolset"/>
+
+    <xsl:element name="{local-name()}">
+      <xsl:apply-templates select="@*"/>
+
+      <xsl:variable name="actual_result">
+        <xsl:choose>
+          <!-- Hack: needs to be researched (and removed). See M.Wille's incident. -->
+          <xsl:when test="run/@result='succeed' and lib/@result='fail'">
+            <xsl:text>success</xsl:text>
+	  </xsl:when>
+          <xsl:when test="./*/@result = 'fail'" >
+            <xsl:text>fail</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>success</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>                     
+      </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="failures_markup" select="$failures_markup//library[@name=$library]/test[@name = $test-name or @name = '*']/mark-failure[  ( toolset/@name = $toolset or toolset/@name = '*' ) ]"/>
+      <xsl:variable name="is_new">
+         <xsl:choose>
+            <xsl:when test="$expected_results_test_case">
+               <xsl:text>no</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>yes</xsl:otherwise>
+         </xsl:choose>
+      </xsl:variable>
+
+      
+      <xsl:variable name="expected_result">
+        <xsl:choose>
+          <xsl:when test='count( $failures_markup ) &gt; 0'>
+            <xsl:text>fail</xsl:text>
+          </xsl:when>
+          
+          <xsl:otherwise>
+            <xsl:choose>
+              <xsl:when test="$expected_results_test_case and $expected_results_test_case/@result = 'fail'">
+                <xsl:text>fail</xsl:text>
+              </xsl:when>
+              
+              <xsl:otherwise>success</xsl:otherwise>
+            </xsl:choose>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="status">
+        <xsl:choose>
+          <xsl:when test="count( $failures_markup ) &gt; 0">
+            <xsl:choose>
+              <xsl:when test="$expected_result = $actual_result">expected</xsl:when>
+              <xsl:otherwise>unexpected</xsl:otherwise>
+            </xsl:choose>
+          </xsl:when>
+
+          <xsl:otherwise>
+            <xsl:choose>
+              <xsl:when test="$expected_result = $actual_result">expected</xsl:when>
+              <xsl:otherwise>unexpected</xsl:otherwise>
+            </xsl:choose>
+          </xsl:otherwise>
+          
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:variable name="notes">
+        <xsl:choose>
+          <xsl:when test='count( $failures_markup ) &gt; 0'>
+            <xsl:for-each select="$failures_markup/note">
+              <xsl:copy-of select="."/>
+            </xsl:for-each>
+            <!--        <xsl:copy-of select="$expected_results_test_case/node()"/>-->
+          </xsl:when>
+
+          
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:attribute name="result"><xsl:value-of select="$actual_result"/></xsl:attribute>
+      <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>
+
+  <xsl:template match="*">
+    <xsl:element name="{local-name()}">
+      <xsl:apply-templates select="@*"/>
+      <xsl:apply-templates select="node()" />
+    </xsl:element>
+  </xsl:template>
+
+  <xsl:template match="@*">
+    <xsl:copy-of select="." />
+  </xsl:template>
+
+</xsl:stylesheet>

+ 146 - 0
tools/regression/xsl_reports/merger/xsl/common.xsl

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+// Copyright (c) MetaCommunications, Inc. 2003-2004
+//
+// Use, modification and distribution are subject to the Boost Software 
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy 
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:exsl="http://exslt.org/common"
+  xmlns:func="http://exslt.org/functions"
+  xmlns:meta="http://www.meta-comm.com"
+  extension-element-prefixes="func"
+  version="1.0">
+
+  <xsl:variable name="output_directory" select="'output'"/>
+
+  <xsl:template name="get_toolsets">
+    <xsl:param name="toolsets"/>
+    <xsl:param name="required-toolsets"/>
+    
+    <xsl:variable name="toolset_output">
+      <xsl:for-each select="$toolsets">
+        <xsl:variable name="toolset" select="."/>
+        <xsl:element name="toolset">
+          <xsl:attribute name="toolset"><xsl:value-of select="$toolset"/></xsl:attribute>
+          <xsl:choose>
+            <xsl:when test="$required_toolsets[ $toolset = @name ]">
+              <xsl:attribute name="required">yes</xsl:attribute>
+              <xsl:attribute name="sort">a</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="required">no</xsl:attribute>
+              <xsl:attribute name="sort">z</xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:element>
+      </xsl:for-each>
+    </xsl:variable>
+    
+    <xsl:for-each select="exsl:node-set( $toolset_output )/toolset">
+      <xsl:sort select="concat( @sort, ' ', @toolset)" order="ascending"/>
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    
+  </xsl:template>
+
+  <func:function name="meta:is_test_log_a_test_case">
+      <xsl:param name="test_log"/>      
+      <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">
+      <xsl:param name="explicit_markup"/>
+      <xsl:param name="library"/>
+      <xsl:param name="toolset"/>
+      
+      <func:result select="$explicit_markup//library[ @name = $library ]/mark-unusable[ toolset/@name = $toolset or toolset/@name='*' ]"/>
+  </func:function>
+
+  <func:function name="meta:encode_path">
+      <xsl:param name="path"/>
+      <func:result select="translate( translate( $path, '/', '-' ), './', '-' )"/>
+  </func:function>
+
+  <func:function name="meta:output_file_path">
+      <xsl:param name="path"/>
+      <func:result select="concat( $output_directory, '/', meta:encode_path( $path ), '.html' )"/>
+  </func:function>
+
+  <xsl:template name="show_notes">
+      <xsl:param name="explicit_markup"/>
+      <xsl:param name="notes"/>
+        <div class="notes">
+          <xsl:for-each select="$notes">
+            <div>
+                <xsl:variable name="refid" select="@refid"/>
+                <xsl:call-template name="show_note">
+                    <xsl:with-param name="note" select="."/>
+                    <xsl:with-param name="reference" select="$explicit_markup//note[ $refid = @id ]"/>
+                </xsl:call-template>
+            </div>
+          </xsl:for-each>
+        </div>
+  </xsl:template>
+
+  <xsl:template name="show_note">
+      <xsl:param name="note"/>
+      <xsl:param name="reference"/>
+      <div class="note">
+          <xsl:variable name="author">
+              <xsl:choose>
+                  <xsl:when test="$note/@author">
+                      <xsl:value-of select="$note/@author"/>
+                  </xsl:when>
+                  <xsl:when test="$reference">
+                      <xsl:value-of select="$reference/@author"/>                               
+                  </xsl:when>
+                  <xsl:otherwise>
+                      <xsl:text/>
+                  </xsl:otherwise>
+              </xsl:choose>
+          </xsl:variable>
+
+          <xsl:variable name="date">
+              <xsl:choose>
+                  <xsl:when test="$note/@date">
+                      <xsl:value-of select="$note/@date"/>
+                  </xsl:when>
+                  <xsl:when test="$reference">
+                      <xsl:value-of select="$reference/@date"/>                      
+                  </xsl:when>
+                  <xsl:otherwise>
+                      <xsl:text/>
+                  </xsl:otherwise>
+              </xsl:choose>
+          </xsl:variable>
+
+      <span class="note-header">
+          <xsl:choose>
+              <xsl:when test="$author != '' and $date != ''">
+                  [&#160;<xsl:value-of select="$author"/>&#160;<xsl:value-of select="$date"/>&#160;]
+              </xsl:when>
+              <xsl:when test="$author != ''">
+                  [&#160;<xsl:value-of select="$author"/>&#160;]                        
+              </xsl:when>
+              <xsl:when test="$date != ''">
+                  [&#160;<xsl:value-of select="$date"/>&#160;]                        
+              </xsl:when>
+          </xsl:choose>
+      </span>
+
+      <xsl:if test="$reference">
+          <xsl:copy-of select="$reference/node()"/>                
+      </xsl:if>
+      <xsl:copy-of select="$note/node()"/>      
+
+      </div>
+  </xsl:template>
+
+
+
+</xsl:stylesheet>

+ 221 - 0
tools/regression/xsl_reports/merger/xsl/issues_page.xsl

@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+// Copyright (c) MetaCommunications, Inc. 2003-2004
+//
+// Use, modification and distribution are subject to the Boost Software 
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy 
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+-->
+
+<xsl:stylesheet 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:exsl="http://exslt.org/common"
+    xmlns:func="http://exslt.org/functions"
+    xmlns:meta="http://www.meta-comm.com"
+    xmlns:set="http://exslt.org/sets"
+    extension-element-prefixes="func exsl"
+    version="1.0">
+
+    <xsl:import href="common.xsl"/>
+
+    <xsl:output method="html" 
+        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
+        encoding="utf-8" 
+        indent="yes"
+        />
+
+
+    <xsl:param name="links_file"/>
+    <xsl:param name="mode"/>
+    <xsl:param name="source"/>
+    <xsl:param name="run_date"/>
+    <xsl:param name="comment_file"/>
+    <xsl:param name="expected_results_file"/>
+    <xsl:param name="explicit_markup_file"/>
+
+    <!-- the author-specified expected test results -->
+    <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
+    <xsl:variable name="expected_results" select="document( $expected_results_file )" />
+     
+    <!-- necessary indexes -->
+    <xsl:key 
+        name="test_name_key" 
+        match="test-log" 
+        use="concat( @library, '@', @test-name )"/>
+                    <xsl:key 
+                        name="a" 
+                        match="." 
+                        use="concat( @library, '@', @test-name )"/>
+
+    <xsl:key 
+        name="library_key" 
+        match="test-log" 
+        use="@library"/>
+    <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
+
+    <!-- toolsets -->
+
+    <xsl:variable name="required_toolsets" select="$explicit_markup//mark-toolset[ @status='required' ]"/>
+    <xsl:variable name="required_toolset_names" select="$explicit_markup//mark-toolset[ @status='required' ]/@name"/>
+    <!-- libraries -->
+    <xsl:variable name="libraries" select="//test-log[ @library != '' and generate-id(.) = generate-id( key('library_key',@library)[1] )  ]/@library"/>
+
+    <xsl:variable name="unexpected_test_cases" select="//test-log[ @status='unexpected' and @result='fail' and @toolset = $required_toolset_names and meta:is_test_log_a_test_case(.)]"/>
+
+    <func:function name="meta:get_library_tests">
+        <xsl:param name="tests"/>
+        <xsl:param name="library"/>
+          
+        <xsl:variable name="a">                  
+            <xsl:for-each select="$tests[ @library=$library ]">
+                <xsl:sort select="@test-name" order="ascending"/>
+                <xsl:copy-of select="."/>
+            </xsl:for-each>
+        </xsl:variable>
+        <func:result select="exsl:node-set( $a )/*"/>
+    </func:function>
+
+
+    <xsl:template match="/">
+
+        <xsl:variable name="issues_list" select="'issues_.html'"/>
+
+        <!-- Issues page -->
+        <html>
+        <head>
+            <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            <title>Boost regression unresolved issues: <xsl:value-of select="$source"/></title>
+        </head>
+        <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+        <frame name="tocframe" src="toc.html" scrolling="auto"/>
+        <frame name="docframe" src="{$issues_list}" scrolling="auto"/>
+        </frameset>
+        </html>
+
+        <!-- Issues list -->
+        <xsl:message>Writing document <xsl:value-of select="$issues_list"/></xsl:message>
+        
+        <exsl:document href="{$issues_list}"
+            method="html" 
+            doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+            encoding="utf-8"
+            indent="yes">
+
+            <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            </head>
+            <body>
+
+                <h1 class="page-title">
+                    <xsl:text>Unresolved Issues: </xsl:text>
+                    <a class="hover-link" href="summary.html" target="_top"><xsl:value-of select="$source"/></a>
+                </h1>
+
+                <div class="report-info">
+                    <div>
+                        <b>Report Time: </b> <xsl:value-of select="$run_date"/>
+                    </div>
+                    <div>
+                        <b>Purpose: </b> Provides a list of current unresolved test failures. 
+                    </div>
+                </div>
+
+                <xsl:for-each select="$libraries">
+                    <xsl:sort select="." order="ascending"/>
+                    <xsl:variable name="library" select="."/>
+                    <xsl:variable name="library_page" select="meta:encode_path( $library )" />
+                
+                    <xsl:variable name="library_tests" select="meta:get_library_tests( $unexpected_test_cases, $library )"/>
+                    <xsl:if test="count( $library_tests ) > 0">
+                        <xsl:variable name="library_test_names" select="set:distinct( $library_tests/@test-name )"/>
+
+                        <h2>
+                            <a class="hover-link" href="{$library_page}.html" target="_top">
+                                <xsl:value-of select="$library"/>
+                            </a>
+                        </h2>
+                        
+                        <table class="library-issues-table" summary="issues">
+                            <thead>
+                                <tr valign="middle">
+                                    <td class="head">test</td>
+                                    <td class="head">failures</td>
+                                </tr>
+                            </thead>
+                            <tfoot>
+                                <tr valign="middle">
+                                    <td class="head">test</td>
+                                    <td class="head">failures</td>
+                                </tr>
+                            </tfoot>
+
+                            <tbody>
+                            <xsl:for-each select="$library_test_names">
+                                <xsl:sort select="." order="ascending"/>
+                                <xsl:variable name="test_name" select="."/>
+                                
+                                <xsl:variable name="unexpected_toolsets" select="$library_tests[ @test-name = $test_name and not (meta:is_unusable( $explicit_markup, $library, @toolset )) ]/@toolset"/>
+                                
+                                <xsl:if test="count( $unexpected_toolsets ) > 0">
+                                    <xsl:variable name="test_program"  select="$library_tests[@test-name = $test_name]/@test-program"/>
+                                    <tr>
+                                        <td class="test-name">
+                                            <a href="../../../{$test_program}" class="test-link">
+                                                <xsl:value-of select="$test_name"/>
+                                            </a>
+                                        </td>
+                                        <td class="failures-row">
+                                            <table summary="unexpected fail legend" class="issue-box">
+                                                <tr class="library-row-single">
+                                                
+                                                <xsl:for-each select="$unexpected_toolsets">
+                                                    <xsl:sort select="." order="ascending"/>
+                                                    <xsl:variable name="toolset" select="."/>
+                                                    <xsl:variable name="test_result" select="$library_tests[@test-name = $test_name and @toolset = $toolset]"/>
+                                                    <xsl:variable name="log_link" select="meta:output_file_path( $test_result/@target-directory )"/>
+                                                    <xsl:variable name="class">
+                                                        <xsl:choose>
+                                                            <xsl:when test="$test_result/@is-new = 'yes'">
+                                                                <xsl:text>library-fail-unexpected-new</xsl:text>
+                                                            </xsl:when>
+                                                            <xsl:otherwise>
+                                                                <xsl:text>library-fail-unexpected</xsl:text>
+                                                            </xsl:otherwise>
+                                                        </xsl:choose>
+                                                    </xsl:variable>
+
+                                                    <td class="{$class}">
+                                                        <span>
+                                                        <a href="{$log_link}" class="log-link" target="_top">
+                                                            <xsl:value-of select="."/>
+                                                        </a>
+                                                        </span>
+                                                    </td>
+                                                </xsl:for-each>
+                                                
+                                                </tr>
+                                            </table>
+                                        </td>
+                                    </tr>
+                                </xsl:if>
+                            </xsl:for-each>
+                            </tbody>
+
+                            </table>
+
+
+                        </xsl:if>
+                    </xsl:for-each>
+
+            <xsl:copy-of select="document( 'html/issues_legend.html' )"/>
+            <xsl:copy-of select="document( 'html/make_tinyurl.html' )"/>
+
+            </body>
+            </html>
+        </exsl:document>  
+
+    </xsl:template>
+</xsl:stylesheet>

+ 131 - 0
tools/regression/xsl_reports/merger/xsl/links_page.xsl

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+// Copyright (c) MetaCommunications, Inc. 2003-2004
+//
+// Use, modification and distribution are subject to the Boost Software 
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy 
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+-->
+
+<xsl:stylesheet 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    xmlns:exsl="http://exslt.org/common"
+    xmlns:func="http://exslt.org/functions"
+    xmlns:meta="http://www.meta-comm.com"
+    extension-element-prefixes="func exsl"
+    version="1.0">
+
+    <xsl:import href="common.xsl"/>
+
+    <xsl:output method="html" 
+        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
+        encoding="utf-8" 
+        indent="yes"
+        />
+
+    <xsl:param name="source"/>
+    <xsl:param name="run_date"/>
+    <xsl:param name="comment_file"/>
+    <xsl:param name="explicit_markup_file"/>
+
+    <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:message>Writing document <xsl:value-of select="$document_path"/></xsl:message>
+
+        <exsl:document href="{$document_path}" 
+        method="html" 
+        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+        encoding="utf-8"
+        indent="yes">
+
+        <html>
+            <xsl:variable name="component">
+            <xsl:choose>
+                <xsl:when test="@test-name != ''">
+                <div class="log-test-title">
+                    <xsl:value-of select="concat( @library, ' - ', @test-name, ' / ', @toolset )"/>
+                </div>
+                </xsl:when>
+                <xsl:otherwise>
+                <xsl:value-of select="@target-dir"/>
+                </xsl:otherwise>
+            </xsl:choose>
+            </xsl:variable>
+            
+            <head>
+            <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            <title>Boost regression - test run output: <xsl:value-of select="$component"/></title>
+            </head>
+
+            <body>
+            <div>
+                <div class="log-test-title">
+                Boost regression - test run output: <xsl:value-of select="$component"/>
+            </div>
+            
+
+            <xsl:if test="notes/note">
+                <p>
+                <div class="notes-title">Notes</div>
+                <xsl:call-template name="show_notes">
+                    <xsl:with-param name="notes" select="notes/note"/>
+                    <xsl:with-param name="explicit_markup" select="$explicit_markup"/>
+                </xsl:call-template>
+                </p>
+            </xsl:if>
+              
+            <xsl:if test="compile">
+                <p>
+                <div class="log-compiler-output-title">Compiler output:</div>
+                <pre>
+                    <xsl:copy-of select="compile/node()"/>
+                </pre>
+                </p>
+            </xsl:if>
+              
+            <xsl:if test="link">
+                <p>
+                <div class="log-linker-output-title">Linker output:</div>
+                <pre>
+                    <xsl:copy-of select="link/node()"/>
+                </pre>
+                </p>
+            </xsl:if>
+
+            <xsl:if test="lib">
+                <p>
+                <div class="log-linker-output-title">Lib output:</div>
+                <p>
+                    See <a href="{meta:encode_path( lib/node() )}.html">
+                    <xsl:copy-of select="lib/node()"/>
+                    </a>
+                </p>
+                </p>
+            </xsl:if>
+              
+            <xsl:if test="run">
+                <p>
+                <div class="log-run-output-title">Run output:</div>
+                <pre>
+                    <xsl:copy-of select="run/node()"/>
+                </pre>
+                </p>
+            </xsl:if>
+              
+            </div>
+
+            <xsl:copy-of select="document( 'html/make_tinyurl.html' )"/>
+
+            </body>
+        
+        </html>
+        </exsl:document>  
+
+    </xsl:template>
+
+</xsl:stylesheet>

+ 21 - 0
tools/regression/xsl_reports/merger/xsl/produce_expected_results.xsl

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:output method="xml" encoding="utf-8"/>
+
+  <xsl:template match="/">
+    <root>
+      <expected-failures>
+        <xsl:apply-templates select="*/test-log"/>
+      </expected-failures>
+    </root>
+  </xsl:template>
+  
+  <xsl:template match="test-log">
+    <xsl:if test="meta:is_test_log_a_test_case(.)">
+        <test-result library="{@library}" test-name="{@test-name}" toolset="{@toolset}" result="{@result}" />
+    </xsl:if>
+  </xsl:template>
+
+</xsl:stylesheet>

+ 644 - 0
tools/regression/xsl_reports/merger/xsl/result_page.xsl

@@ -0,0 +1,644 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+// Copyright (c) MetaCommunications, Inc. 2003-2004
+//
+// Use, modification and distribution are subject to the Boost Software 
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy 
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+-->
+
+<xsl:stylesheet 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    xmlns:exsl="http://exslt.org/common"
+    xmlns:func="http://exslt.org/functions"
+    xmlns:set="http://exslt.org/sets"
+    xmlns:meta="http://www.meta-comm.com"
+    extension-element-prefixes="func exsl"
+    version="1.0">
+
+    <xsl:import href="common.xsl"/>
+
+    <xsl:output method="html" 
+        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
+        encoding="utf-8" 
+        indent="yes"
+        />
+
+    <xsl:param name="links_file"/>
+    <xsl:param name="mode"/>
+    <xsl:param name="source"/>
+    <xsl:param name="run_date"/>
+    <xsl:param name="comment_file"/>
+    <xsl:param name="expected_results_file"/>
+    <xsl:param name="explicit_markup_file"/>
+
+    <!-- the author-specified expected test results -->
+    <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
+    <xsl:variable name="expected_results" select="document( $expected_results_file )" />
+
+    <xsl:variable name="alternate_mode">
+        <xsl:choose>
+        <xsl:when test="$mode='user'">developer</xsl:when>
+        <xsl:otherwise>user</xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>
+     
+    <!-- necessary indexes -->
+    <xsl:key 
+        name="test_name_key" 
+        match="test-log" 
+        use="concat( @library, '&gt;@&lt;', @test-name )"/>
+    <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
+
+    <!-- toolsets -->
+
+    <xsl:variable name="not_ordered_toolsets" select="//test-log[ generate-id(.) = generate-id( key('toolset_key',@toolset)[1] ) and @toolset != '' ]/@toolset"/>
+
+    <xsl:variable name="required_toolsets" select="$explicit_markup//mark-toolset[ @status='required' ]"/>
+
+    <xsl:variable name="ordered_toolsets_fragment">
+        <xsl:call-template name="get_toolsets">
+        <xsl:with-param name="toolsets" select="$not_ordered_toolsets"/>
+        <xsl:with-param name="required_toolsets" select="$required_toolsets"/>
+        </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="ordered_toolsets" select="exsl:node-set( $ordered_toolsets_fragment )"/>
+
+    <!-- libraries -->
+    <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:template name="insert_toolsets_row">
+        <xsl:param name="library"/>
+        <xsl:param name="library_marks"/>
+        <xsl:param name="toolsets"/>
+        <tr valign="middle">
+        <td class="head" colspan="2">test / toolset</td>
+
+        <xsl:variable name="all_library_notes" select="$library_marks/note"/>
+        <xsl:for-each select="$toolsets/toolset">
+            <xsl:variable name="toolset" select="@toolset"/>
+
+            <xsl:variable name="class">
+            <xsl:choose>
+                <xsl:when test="@required='yes'">
+                    <xsl:text>required-toolset-name</xsl:text>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:text>toolset-name</xsl:text>
+                </xsl:otherwise>
+            </xsl:choose>
+            </xsl:variable>
+
+            <xsl:variable name="toolset_notes_fragment">
+                <xsl:for-each select="$all_library_notes">
+                    <xsl:if test="../@toolset=$toolset or ( ../toolset/@name=$toolset or ../toolset/@name = '*' )">
+                        <note index="{position()}"/>
+                    </xsl:if>
+                </xsl:for-each>
+            </xsl:variable>
+
+            <xsl:variable name="toolset_notes" select="exsl:node-set( $toolset_notes_fragment )/*"/>
+
+            <td class="{$class}"><xsl:value-of select="$toolset"/>
+            <xsl:if test="count( $toolset_notes ) > 0">
+                <span class="super">
+                    <xsl:for-each select="$toolset_notes">
+                        <xsl:variable name="note_index" select="@index"/>
+                        <xsl:if test="generate-id( . ) != generate-id( $toolset_notes[1] )">, </xsl:if>
+                        <a href="#{$library}-note-{$note_index}" title="Note {$note_index}">
+                            <xsl:value-of select="$note_index"/>
+                        </a>
+                    </xsl:for-each>
+                </span>
+            </xsl:if>
+            </td>
+        </xsl:for-each>
+
+        <td class="head">toolset / test</td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template name="test_type_col">
+        <td class="test-type">
+        <a href="../../../status/compiler_status.html#Understanding" class="legend-link">
+            <xsl:variable name="test_type" select="./@test-type"/>
+            <xsl:choose>
+            <xsl:when test="$test_type='run_pyd'">      <xsl:text>r</xsl:text>  </xsl:when>
+            <xsl:when test="$test_type='run'">          <xsl:text>r</xsl:text>  </xsl:when>
+            <xsl:when test="$test_type='run_fail'">     <xsl:text>rf</xsl:text> </xsl:when>
+            <xsl:when test="$test_type='compile'">      <xsl:text>c</xsl:text>  </xsl:when>
+            <xsl:when test="$test_type='compile_fail'"> <xsl:text>cf</xsl:text> </xsl:when>
+            <xsl:otherwise>
+                <xsl:message terminate="yes">Incorrect test type "<xsl:value-of select="$test_type"/>"</xsl:message>
+            </xsl:otherwise>
+            </xsl:choose>
+        </a>
+        </td>
+    </xsl:template>
+
+
+    <xsl:template match="/">
+
+        <xsl:variable name="index_path" select="'index_.html'"/>
+        
+        <!-- Index page -->
+        <head>
+            <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            <title>Boost regression: <xsl:value-of select="$source"/></title>
+        </head>
+        <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+            <frame name="tocframe" src="toc.html" scrolling="auto"/>
+            <frame name="docframe" src="{$index_path}" scrolling="auto"/>
+        </frameset>
+
+        <!-- Index content -->
+        <xsl:message>Writing document <xsl:value-of select="$index_path"/></xsl:message>
+
+        <exsl:document href="{$index_path}" 
+            method="html" 
+            doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+            encoding="utf-8"
+            indent="yes">
+
+            <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            </head>
+            <body>
+
+                <img border="0" src="../../../c++boost.gif" width="277" height="86" align="right" alt="Boost logo"></img>
+
+                <h1 class="page-title">
+                    <xsl:value-of select="$mode"/>
+                    <xsl:text> report: </xsl:text>
+                    <a class="hover-link" href="summary.html" target="_top"><xsl:value-of select="$source"/></a>
+                </h1>                            
+
+                <div class="report-info">
+                    <div>
+                        <b>Report Time: </b> <xsl:value-of select="$run_date"/>
+                    </div>
+                      
+                    <div>
+                        <b>Purpose: </b>
+                        <xsl:choose>
+                            <xsl:when test="$mode='user'">
+                                The purpose of this report is to help a user to find out whether a particular library 
+                                works on the particular compiler(s). For CVS "health report", see 
+                                <a href="../{$alternate_mode}/index.html" target="_top">developer summary</a>.
+                            </xsl:when>
+                            <xsl:when test="$mode='developer'">
+                                Provides Boost developers with visual indication of the CVS "health". For user-level 
+                                report, see <a href="../{$alternate_mode}/index.html" target="_top">user summary</a>.
+                            </xsl:when>
+                        </xsl:choose>
+                    </div>
+                </div>
+                              
+                <div class="comment">
+                    <xsl:if test="$comment_file != ''">
+                        <xsl:copy-of select="document( $comment_file )"/>
+                    </xsl:if>
+                </div>
+
+            </body>
+            </html>
+        </exsl:document>  
+
+              
+        <xsl:variable name="multiple.libraries" select="count( $libraries ) > 1"/>
+
+        <!-- TOC -->
+        <xsl:if test="$multiple.libraries">
+            
+            <xsl:variable name="toc_path" select="'toc.html'"/>
+            <xsl:message>Writing document <xsl:value-of select="$toc_path"/></xsl:message>
+
+            <exsl:document href="{$toc_path}" 
+                method="html" 
+                doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                encoding="utf-8"
+                indent="yes">
+
+            <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            </head>
+            <body class="{$mode}-toc">
+                <div class="toc-header-entry">
+                    <a href="index.html" class="toc-entry" target="_top">Report info</a>
+                </div>
+                <div class="toc-header-entry">
+                    <a href="summary.html" class="toc-entry" target="_top">Summary</a>
+                </div>
+                
+                <xsl:if test="$mode='developer'">
+                    <div class="toc-header-entry">
+                        <a href="issues.html" class="toc-entry" target="_top">Unresolved issues</a>
+                    </div>
+                </xsl:if>
+                <hr/>
+                  
+                <xsl:for-each select="$libraries">
+                    <xsl:sort select="." order="ascending" />
+                    <xsl:variable name="library_page" select="meta:encode_path(.)" />
+                    <div class="toc-entry">
+                        <a href="{$library_page}.html" class="toc-entry" target="_top">
+                            <xsl:value-of select="."/>
+                        </a>
+                    </div>
+                </xsl:for-each>
+            </body>
+            </html>
+            
+            </exsl:document>  
+        </xsl:if> 
+         
+        <!-- Libraries -->
+        <xsl:for-each select="$libraries">
+            <xsl:sort select="." order="ascending" />
+            <xsl:variable name="library" select="." />
+            
+            <xsl:variable name="library_results" select="concat( meta:encode_path( $library ), '_.html' )"/>
+            <xsl:variable name="library_page" select="concat( meta:encode_path( $library ), '.html' )"/>
+
+            <!-- Library page -->
+            <xsl:message>Writing document <xsl:value-of select="$library_page"/></xsl:message>
+            
+            <exsl:document href="{$library_page}"
+                method="html" 
+                doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                encoding="utf-8"
+                indent="yes">
+
+                <html>
+                <head>
+                    <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+                    <title>Boost regression: <xsl:value-of select="$library"/>/<xsl:value-of select="$source"/></title>
+                </head>
+                <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+                <frame name="tocframe" src="toc.html" scrolling="auto"/>
+                <frame name="docframe" src="{$library_results}" scrolling="auto"/>
+                </frameset>
+                </html>
+            </exsl:document>  
+
+            <!-- Library results frame -->
+            <xsl:message>Writing document <xsl:value-of select="$library_results"/></xsl:message>
+            
+            <exsl:document href="{$library_results}"
+                method="html" 
+                doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                encoding="utf-8"
+                indent="yes">
+
+                <html>
+                <head>
+                    <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+                </head>
+                  
+                <body>
+
+                <h1 class="page-title">
+                    <a class="hover-link" name="{$library}" href="../../../libs/{$library}">
+                        <xsl:value-of select="$library" />
+                    </a>
+                    <xsl:text>/</xsl:text>
+                    <a class="hover-link" href="summary.html" target="_top"><xsl:value-of select="$source"/></a>
+                </h1>
+
+                <div class="report-info">
+                    <b>Report Time: </b> <xsl:value-of select="$run_date"/>
+                </div>
+
+                <xsl:variable name="library_marks" select="$explicit_markup//library[ @name = $library ]/mark-unusable[ toolset/@name = $not_ordered_toolsets ]"/>
+
+                <table border="0" cellspacing="0" cellpadding="0" class="library-table" summary="library results">
+
+                    <thead>
+                    <xsl:call-template name="insert_toolsets_row">
+                        <xsl:with-param name="library_marks" select="$library_marks"/>
+                        <xsl:with-param name="library" select="$library"/>
+                        <xsl:with-param name="toolsets" select="$ordered_toolsets"/>
+                    </xsl:call-template>
+                    </thead>
+                    <tfoot>
+                    <xsl:call-template name="insert_toolsets_row">
+                        <xsl:with-param name="library_marks" select="$library_marks"/>
+                        <xsl:with-param name="library" select="$library"/>
+                        <xsl:with-param name="toolsets" select="$ordered_toolsets"/>
+                    </xsl:call-template>
+                    </tfoot>
+
+                    <tbody>
+                        <!-- lib_tests = test_log* -->
+                        <xsl:variable name="lib_tests" select="$test_case_logs[@library = $library]" /> 
+
+                        <!-- lib_unique_test_names = test_log* -->
+                        <xsl:variable name="lib_unique_test_names" 
+                            select="$lib_tests[ generate-id(.) = generate-id( key('test_name_key', concat( @library, '&gt;@&lt;', @test-name ) ) ) ]" />
+
+                        <xsl:variable name="lib_corner_case_tests_markup" select="$explicit_markup//library[ @name = $library ]/test[ @corner-case='yes' ]"/>
+                        
+                        <xsl:variable name="lib_general_tests" 
+                            select="meta:order_tests_by_name( $lib_unique_test_names[ not( @test-name = $lib_corner_case_tests_markup/@name ) ]  )"/>
+
+
+                        <xsl:variable name="lib_corner_case_tests" select="meta:order_tests_by_name( $lib_unique_test_names[ @test-name = $lib_corner_case_tests_markup/@name ] ) " />
+
+                        <!-- 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"/>
+                        </xsl:call-template>
+
+                        <!-- corner-case tests section -->
+
+                        <xsl:if test="count( $lib_corner_case_tests ) > 0">
+                            <tr>
+                                <!--<td colspan="2">&#160;</td>                  -->
+                                <td class="library-corner-case-header" colspan="{count($ordered_toolsets) + 3 }" align="center">Corner-case tests</td>
+                                <!--<td>&#160;</td>-->
+                            </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"/>
+                        </xsl:call-template>
+                        
+                    </xsl:if>
+
+                    </tbody>
+                </table>
+                <xsl:if test="count( $library_marks/note ) > 0 ">
+                    <table border="0" cellpadding="0" cellspacing="0" class="library-library-notes" summary="library notes">
+                    <xsl:for-each select="$library_marks/note">
+                        <tr class="library-library-note">
+                        <td valign="top" width="3em">
+                            <a name="{$library}-note-{position()}">
+                            <span class="super"><xsl:value-of select="position()"/></span>
+                            </a>
+                        </td>
+                        <td>
+                            <xsl:variable name="refid" select="@refid"/>
+                            <xsl:call-template name="show_note">
+                                <xsl:with-param name="note" select="." />
+                                <xsl:with-param name="reference" select="$explicit_markup//note[ $refid = @id ]"/>
+                            </xsl:call-template>
+                        </td>
+                        </tr>
+                    </xsl:for-each>
+                    </table>
+                </xsl:if>
+                    
+                <xsl:copy-of select="document( concat( 'html/library_', $mode, '_legend.html' ) )"/>
+                <xsl:copy-of select="document( 'html/make_tinyurl.html' )"/>
+
+                </body>
+                </html>
+            
+            </exsl:document>  
+
+            </xsl:for-each>
+
+    </xsl:template>
+      
+
+    <!-- report developer status -->
+    <xsl:template name="insert_cell_developer">
+        <xsl:param name="test_log"/>
+        <xsl:param name="log_link"/>
+        
+        <xsl:variable name="is_new">
+        <xsl:if test="$test_log/@is-new = 'yes' and $test_log/@status = 'unexpected' and $test_log/@result != 'success'">
+            <xsl:value-of select="'-new'"/>
+        </xsl:if>
+        </xsl:variable>
+
+        <xsl:variable name="class">
+        <xsl:choose>
+            <xsl:when test="not( $test_log )">
+            <xsl:text>library-missing</xsl:text>
+            </xsl:when>
+            <xsl:when test="meta:is_unusable( $explicit_markup, $test_log/@library, $test_log/@toolset )">
+            <xsl:text>library-unusable</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+            <xsl:value-of select="concat( 'library-', $test_log/@result, '-', $test_log/@status, $is_new )"/>
+            </xsl:otherwise>
+        </xsl:choose>
+        </xsl:variable>
+
+        <td class="{$class}">
+        <xsl:choose>
+            <xsl:when test="not( $test_log )">
+            <xsl:text>missing</xsl:text>
+            </xsl:when> 
+            <xsl:when test="$test_log/@result != 'success' and $test_log/@status = 'expected'">
+            <a href="{$log_link}" class="log-link" target="_top">
+                fail
+            </a>
+            </xsl:when>
+            <xsl:when test="$test_log/@result != 'success' and $test_log/@status = 'unexpected'">
+            <a href="{$log_link}" class="log-link" target="_top">
+                fail
+            </a>
+            </xsl:when>
+            <xsl:when test="$test_log/@result = 'success' and $test_log/@status = 'unexpected'">
+                pass
+            </xsl:when>
+            <xsl:otherwise>
+            <xsl:text>pass</xsl:text>
+            </xsl:otherwise>
+        </xsl:choose>  
+        <xsl:if test="count( $test_log ) > 1" > 
+            <div class="library-conf-problem">conf.&#160;problem</div>
+        </xsl:if>
+        </td>
+    </xsl:template>
+
+    <!-- report user status -->
+    <xsl:template name="insert_cell_user">
+        <xsl:param name="test_log"/>
+        <xsl:param name="log_link"/>
+        
+        <xsl:variable name="class">
+        <xsl:choose>
+            <xsl:when test="not( $test_log )">
+            <xsl:text>library-missing</xsl:text>
+            </xsl:when>
+            <xsl:when test="meta:is_unusable( $explicit_markup, $test_log/@library, $test_log/@toolset )">
+            <xsl:text>library-unusable</xsl:text>
+            </xsl:when>
+            <xsl:when test="$test_log[@result='fail' and @status='unexpected']">
+            <xsl:text>library-user-fail-unexpected</xsl:text>
+            </xsl:when>
+            <xsl:when test="$test_log[ @result='fail' and @status='expected' ]">
+            <xsl:text>library-user-fail-expected</xsl:text>
+        </xsl:when>
+        <xsl:when test="$test_log[ @result='success']">
+            <xsl:text>library-user-success</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:message terminate="yes">
+            Unknown status
+            </xsl:message>
+        </xsl:otherwise>
+        </xsl:choose>
+
+    </xsl:variable>
+
+        <td class="{$class}">
+        <xsl:choose>
+            <xsl:when test="not( $test_log )">
+            missing
+            </xsl:when>
+            <xsl:when test="$test_log/@result != 'success' and $test_log/@status = 'expected'">
+            <a href="{$log_link}" class="log-link" target="_top">
+                fail
+            </a>
+            </xsl:when>
+            <xsl:when test="$test_log/@result != 'success'">
+            <a href="{$log_link}" class="log-link" target="_top">
+                unexp.
+            </a>
+            </xsl:when>
+            <xsl:otherwise>
+            <xsl:text>pass</xsl:text>
+            </xsl:otherwise>
+        </xsl:choose>  
+
+        <xsl:if test="count( $test_log ) > 1" > 
+            <div class="conf-problem">conf.&#160;problem</div>
+        </xsl:if>
+        </td>
+    </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"/>
+        <xsl:param name="line_mod"/>
+
+        <xsl:variable name="test_program">
+        <xsl:value-of select="$test_results[1]/@test-program"/>
+        </xsl:variable>
+
+        <xsl:variable name="test_header">
+        <td class="test-name">
+            <a href="../../../{$test_program}" class="test-link">
+            <xsl:value-of select="$test_name"/>
+            </a>
+        </td>
+        </xsl:variable>
+
+        <tr class="library-row{$line_mod}">
+        <xsl:copy-of select="$test_header"/>
+        <xsl:call-template name="test_type_col"/>
+          
+        <xsl:for-each select="$toolsets/toolset">
+            <xsl:variable name="toolset" select="@toolset" />
+
+            <!-- Write log file -->
+            <xsl:variable name="test_result_for_toolset" select="$test_results[ @toolset = $toolset ]"/>
+            <xsl:variable name="log_file" select="meta:output_file_path( $test_result_for_toolset/@target-directory )"/>
+            <xsl:message>Writing document <xsl:value-of select="$log_file"/></xsl:message>
+            
+            <exsl:document href="{$log_file}"
+                method="html" 
+                doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+                encoding="utf-8"
+                indent="yes">
+
+                <html>
+                <head>
+                    <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+                    <!--<title>Boost regression unresolved issues: <xsl:value-of select="$source"/></title>-->
+                </head>
+                <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+                <frame name="tocframe" src="../toc.html" scrolling="auto"/>
+                <frame name="docframe" src="../../{$log_file}" scrolling="auto"/>
+                </frameset>
+                </html>
+            </exsl:document>
+
+            <!-- Insert cell -->
+            <xsl:choose>
+            <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="$log_file"/>
+                </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="$log_file"/>
+                </xsl:call-template>
+            </xsl:when>
+            </xsl:choose>
+            
+        </xsl:for-each>
+        <xsl:copy-of select="$test_header"/>
+        </tr>
+    </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"/>
+
+        <xsl:for-each select="$section_tests">
+            <xsl:variable name="test_name" select="@test-name"/>
+            <xsl:variable name="line_mod">
+                <xsl:choose>
+                    <xsl:when test="1 = last()">
+                        <xsl:text>-single</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="generate-id( . ) = generate-id( $section_tests[1] )">
+                        <xsl:text>-first</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="generate-id( . ) = generate-id( $section_tests[last()] )">
+                        <xsl:text>-last</xsl:text>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:text></xsl:text>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </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"/>
+                <xsl:with-param name="line_mod" select="$line_mod"/>
+            </xsl:call-template>
+        </xsl:for-each>
+          
+    </xsl:template>
+
+    <func:function name="meta:order_tests_by_name">
+        <xsl:param name="tests"/>
+
+        <xsl:variable name="a">                  
+            <xsl:for-each select="$tests">
+                <xsl:sort select="@test-name" order="ascending"/>
+                <xsl:copy-of select="."/>
+            </xsl:for-each>
+        </xsl:variable>
+        <func:result select="exsl:node-set( $a )/*"/>
+    </func:function>
+
+</xsl:stylesheet>

+ 363 - 0
tools/regression/xsl_reports/merger/xsl/summary_page.xsl

@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+// Copyright (c) MetaCommunications, Inc. 2003-2004
+//
+// Use, modification and distribution are subject to the Boost Software 
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy 
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+-->
+
+<xsl:stylesheet 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+    xmlns:exsl="http://exslt.org/common"
+    xmlns:func="http://exslt.org/functions"
+    xmlns:set="http://exslt.org/sets"
+    xmlns:meta="http://www.meta-comm.com"
+    extension-element-prefixes="func exsl"
+    version="1.0">
+
+    <xsl:import href="common.xsl"/>
+
+    <xsl:output method="html" 
+        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
+        encoding="utf-8" 
+        indent="yes"
+        />
+
+
+    <xsl:param name="mode"/>
+    <xsl:param name="source"/>
+    <xsl:param name="run_date"/>
+    <xsl:param name="comment_file"/>
+    <xsl:param name="explicit_markup_file"/>
+
+    <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
+
+    <!-- necessary indexes -->
+    <xsl:key 
+        name="library_test_name_key" 
+        match="test-log" 
+        use="concat( @library, '&gt;@&lt;', @test-name )"/>
+    <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
+    <xsl:key name="test_name_key"  match="test-log" use="@test-name "/>
+
+    <!-- toolsets -->
+
+    <xsl:variable name="toolsets" select="//test-log[ generate-id(.) = generate-id( key('toolset_key',@toolset)[1] ) and @toolset != '' ]/@toolset"/>
+
+    <xsl:variable name="required_toolsets" select="$explicit_markup//mark-toolset[ @status='required' ]"/>
+
+    <xsl:variable name="sorted_toolset_fragment">
+        <xsl:call-template name="get_toolsets">
+        <xsl:with-param name="toolsets" select="$toolsets"/>
+        <xsl:with-param name="required_toolsets" select="$required_toolsets"/>
+        </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:variable name="sorted_toolsets" select="exsl:node-set( $sorted_toolset_fragment )"/>
+        
+    <!-- libraries -->
+
+    <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="sorted_libraries_output">
+        <xsl:for-each select="$libraries">
+            <xsl:sort select="." order="ascending" />
+            <library><xsl:copy-of select="."/></library>
+        </xsl:for-each>
+    </xsl:variable>
+
+    <xsl:variable name="sorted_libraries" select="exsl:node-set( $sorted_libraries_output )/library/@library"/>
+
+      
+    <xsl:template match="/">
+
+        <xsl:variable name="summary_results" select="'summary_.html'"/>
+
+        <!-- Summary page -->
+        <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+                <title>Boost regression summary: <xsl:value-of select="$source"/></title>
+            </head>
+            <frameset cols="190px,*" frameborder="0" framespacing="0" border="0">
+            <frame name="tocframe" src="toc.html" scrolling="auto"/>
+            <frame name="docframe" src="{$summary_results}" scrolling="auto"/>
+            </frameset>
+        </html>
+
+        <!-- Summary results -->
+        <xsl:message>Writing document <xsl:value-of select="$summary_results"/></xsl:message>
+        
+        <exsl:document href="{$summary_results}"
+            method="html" 
+            doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
+            encoding="utf-8"
+            indent="yes">
+
+            <html>
+            <head>
+                <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
+            </head>
+            <body>
+
+            <h1 class="page-title">
+                <xsl:text>Summary: </xsl:text>
+                <a class="hover-link" href="summary.html" target="_top"><xsl:value-of select="$source"/></a>
+            </h1>
+
+            <div class="report-info">
+                <b>Report Time: </b> <xsl:value-of select="$run_date"/>
+            </div>
+
+            <!-- summary table -->
+
+            <table border="0" cellspacing="0" cellpadding="0" class="summary-table">
+
+            <thead>
+                <xsl:call-template name="insert_toolsets_row">
+                <xsl:with-param name="toolsets" select="$sorted_toolsets"/>
+                </xsl:call-template>
+            </thead>
+
+            <tfoot>
+                <xsl:call-template name="insert_toolsets_row">
+                <xsl:with-param name="toolsets" select="$sorted_toolsets"/>
+                </xsl:call-template>
+            </tfoot>
+          
+            <tbody>
+                <xsl:variable name="test_logs" select="$test_case_logs"/>
+
+                <!-- for each library -->
+                <xsl:for-each select="$sorted_libraries">
+                <xsl:variable name="library" select="."/>
+                <xsl:variable name="library_page" select="meta:encode_path( $library )" />
+                <xsl:variable name="current_row" select="$test_logs[ @library=$library]"/>
+
+                <xsl:variable name="expected_test_count" select="count( $current_row[ generate-id(.) = generate-id( key('test_name_key',@test-name)[1] ) ] )"/>
+                <xsl:variable name="library_header">
+                    <td class="library-name">
+                    <a href="{$library_page}.html" class="library-link" target="_top">
+                        <xsl:value-of select="$library"/>
+                    </a>
+                    </td>
+                </xsl:variable>
+
+                <xsl:variable name="line_mod">
+                    <xsl:choose>
+                    <xsl:when test="1 = last()">
+                        <xsl:text>-single</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="generate-id( . ) = generate-id( $sorted_libraries[1] )">
+                        <xsl:text>-first</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="generate-id( . ) = generate-id( $sorted_libraries[ last() ] )">
+                        <xsl:text>-last</xsl:text>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:text></xsl:text>
+                    </xsl:otherwise>
+                    </xsl:choose>
+                </xsl:variable>
+
+
+                <tr class="summary-row{$line_mod}">
+                    <xsl:copy-of select="$library_header"/>
+
+                    <xsl:for-each select="$sorted_toolsets/toolset">
+                    <xsl:variable name="toolset" select="@toolset"/>
+                    <xsl:variable name="current_cell" select="$current_row[ @toolset=$toolset ]"/>
+                    <xsl:choose>
+                        <xsl:when test="$mode='user'">
+                        <xsl:call-template name="insert_cell_user">
+                            <xsl:with-param name="current_cell" select="$current_cell"/>
+                            <xsl:with-param name="library" select="$library"/>
+                            <xsl:with-param name="toolset" select="$toolset"/>
+                            <xsl:with-param name="expected_test_count" select="$expected_test_count"/>
+                        </xsl:call-template>
+                        </xsl:when>
+                        <xsl:when test="$mode='developer'">
+                        <xsl:call-template name="insert_cell_developer">
+                            <xsl:with-param name="current_cell" select="$current_cell"/>
+                            <xsl:with-param name="library" select="$library"/>
+                            <xsl:with-param name="toolset" select="$toolset"/>
+                            <xsl:with-param name="expected_test_count" select="$expected_test_count"/>
+                        </xsl:call-template>
+                        </xsl:when>
+                    </xsl:choose>
+                    </xsl:for-each>
+                    
+                    <xsl:copy-of select="$library_header"/>
+                </tr>          
+                </xsl:for-each>
+            </tbody>
+            </table>
+
+            <xsl:copy-of select="document( concat( 'html/summary_', $mode, '_legend.html' ) )"/>
+            <xsl:copy-of select="document( 'html/make_tinyurl.html' )"/>
+
+            </body>
+            </html>
+        </exsl:document>  
+
+    </xsl:template>
+
+    <!-- report developer status -->
+    <xsl:template name="insert_cell_developer">
+    <xsl:param name="current_cell"/>
+    <xsl:param name="library"/>
+    <xsl:param name="toolset"/>
+    <xsl:param name="expected_test_count"/>
+    <xsl:variable name="class">
+        <xsl:choose> 
+        <xsl:when test="meta:is_unusable( $explicit_markup, $library, $toolset )">
+            <xsl:text>summary-unusable</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell ) &lt; $expected_test_count">
+            <xsl:text>summary-missing</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[@result='fail' and  @status='unexpected' and @is-new='no'] )">
+            <xsl:text>summary-fail-unexpected</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[@result='fail' and  @status='unexpected' and @is-new='yes'] )">
+            <xsl:text>summary-fail-unexpected-new</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[@result='success' and  @status='unexpected'] )">
+            <xsl:text>summary-success-unexpected</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[@status='expected'] )">
+            <xsl:text>summary-expected</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:value-of select="count( $current_cell )"/>
+        </xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>
+      
+    <xsl:variable name="library_page" select="meta:encode_path( $library )" />
+
+    <td class="{$class}">
+        <xsl:choose>
+        <xsl:when test="$class='summary-unusable'">
+            <a href="{$library_page}.html" class="log-link" target="_top">
+            <xsl:text>n/a</xsl:text>
+            </a>          
+        </xsl:when>
+        <xsl:when test="$class='summary-missing'">
+            <xsl:text>missing</xsl:text>
+        </xsl:when>
+        <xsl:when test="$class='summary-fail-unexpected'">
+            <a href="{$library_page}.html" class="log-link" target="_top">
+            <xsl:text>broken</xsl:text>
+            </a>
+        </xsl:when>
+        <xsl:when test="$class='summary-fail-unexpected-new' ">
+            <a href="{$library_page}.html" class="log-link" target="_top">
+            <xsl:text>fail</xsl:text>
+            </a>
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:text>OK</xsl:text>
+        </xsl:otherwise>
+        </xsl:choose>
+    </td>
+      
+    </xsl:template>
+
+
+    <!-- report user status -->
+    <xsl:template name="insert_cell_user">
+    <xsl:param name="current_cell"/>
+    <xsl:param name="library"/>
+    <xsl:param name="toolset"/>
+    <xsl:param name="expected_test_count"/>
+    <xsl:variable name="class">
+        <xsl:choose>
+        <xsl:when test="meta:is_unusable( $explicit_markup, $library, $toolset )">
+            <xsl:text>summary-unusable</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell ) &lt; $expected_test_count">
+            <xsl:text>summary-missing</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[@result='fail' and @status='unexpected' ] )">
+            <xsl:text>summary-user-fail-unexpected</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[ @result='fail'] )">
+            <xsl:text>summary-user-fail-expected</xsl:text>
+        </xsl:when>
+        <xsl:when test="count( $current_cell[ @result='success'] )">
+            <xsl:text>summary-user-success</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:message terminate="yes">
+                Unknown status
+                <xsl:copy-of select="$current_cell">
+                </xsl:copy-of>
+            </xsl:message>
+        </xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>
+      
+    <xsl:variable name="library_page" select="meta:encode_path( $library )" />
+    
+    <td class="{$class}">
+        <xsl:choose>
+        <xsl:when test="$class='summary-unusable'">
+            <a href="{$library_page}.html" class="log-link" target="_top">
+            <xsl:text>unusable</xsl:text>
+            </a>          
+        </xsl:when>
+
+        <xsl:when test="$class='summary-missing'">
+            <xsl:text>missing</xsl:text>
+        </xsl:when>
+
+        <xsl:when test="$class='summary-user-fail-unexpected'">
+            <a href="{$library_page}.html" class="log-link" target="_top">
+            <xsl:text>unexp.</xsl:text>
+            </a>
+        </xsl:when>
+
+        <xsl:when test="$class='summary-user-fail-expected'">
+            <a href="{$library_page}.html" class="log-link" target="_top">
+            <xsl:text>details</xsl:text>
+            </a>
+        </xsl:when>
+
+        <xsl:otherwise>
+            <xsl:text>&#160;</xsl:text>
+        </xsl:otherwise>
+        </xsl:choose>
+    </td>
+      
+    </xsl:template>
+
+    <xsl:template name="insert_toolsets_row">
+    <xsl:param name="toolsets"/>
+    <tr>
+        <td class="head">library / toolset</td>
+        
+        <xsl:for-each select="$toolsets/toolset">
+        <xsl:variable name="class">
+            <xsl:choose>
+            <xsl:when test="@required='yes'">
+                <xsl:text>required-toolset-name</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:text>toolset-name</xsl:text>
+            </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+          
+        <td class="{$class}"><xsl:value-of select="@toolset"/></td>
+        </xsl:for-each>
+
+        <td class="head">toolset / library</td>
+    </tr>
+    </xsl:template>
+
+</xsl:stylesheet>

粤ICP备19079148号