Browse Source

Added fhe following functionality:

1. Unusable libraries markup.
2. Corner-case tests markup.
3. Required libraries markup.
4. Better visual presentation on many browsers.


[SVN r21254]
Misha Bergal 22 years ago
parent
commit
73426e3dfc

+ 90 - 53
tools/regression/xsl_reports/report.py

@@ -132,7 +132,8 @@ def libxslt( xml_file, xsl_file, output_file, parameters = None ):
 
     if parameters is not None:
          for i in parameters: 
-              transform_command = transform_command + ' --param %s "\'%s\'" ' % ( i, parameters[ i ] )
+             parameters[i] = parameters[i].replace( "\\", "/" )
+             transform_command = transform_command + ' --param %s "\'%s\'" ' % ( i, parameters[ i ] )
 
     transform_command = transform_command + ' "%s" ' % xsl_file
     transform_command = transform_command + ' "%s" ' % xml_file
@@ -160,6 +161,7 @@ def make_result_pages( test_results_file
                        , results_dir
                        , result_prefix
                        , xslt_proc_name
+                       , reports
                        ):
     log( "Producing the reports..." )
     __log__ = 1
@@ -178,58 +180,67 @@ def make_result_pages( test_results_file
     else:
         expected_results_file = os.path.abspath( map_path( "empty_expected_results.xml" ) )
         
-    
+
     extended_test_results = os.path.join( output_dir, "extended_test_results.xml" )
-    log( "    Merging with expected results..." )
-    xslt_proc( test_results_file
-               , xsl_path( "add_expected_results.xsl" )
-               , extended_test_results
-               , { "expected_results_file": expected_results_file, "failures_markup_file" : failures_markup_file }
-           )
+    if "x" in reports:    
+        log( "    Merging with expected results..." )
+        xslt_proc( test_results_file
+                   , xsl_path( "add_expected_results.xsl" )
+                   , extended_test_results
+                   , { "expected_results_file": expected_results_file, "failures_markup_file" : failures_markup_file }
+                 )
 
     links = os.path.join( output_dir, "links.html"  )
-    log( "    Making -links file..." )
-    xslt_proc( extended_test_results
-               , xsl_path( "links_page.xsl" )
-               , links
-               , {
-                 "source": source
-                 , "run_date": run_date 
-                 , "comment_file": comment_file
-                 }
-           )
-
-    log( "    Making detailed reports..." )
+    if "l" in reports:        
+        log( "    Making -links file..." )
+        xslt_proc( extended_test_results
+                   , xsl_path( "links_page.xsl" )
+                   , links
+                   , {
+                     "source": source
+                     , "run_date": run_date 
+                     , "comment_file": comment_file
+                     }
+                   )
+
+
     for mode in ( "developer", "user" ):
-        xslt_proc(  extended_test_results
-                    , xsl_path( "result_page.xsl" )
-                    , os.path.join( output_dir, "%s_%s" % ( mode, "result_page.html" ) )
-                    , { "links_file": "links.html"
-                        , "mode": mode
-                        , "source": source
-                        , "run_date": run_date 
-                        , "comment_file": comment_file
-                        , "expected_results_file": expected_results_file
-                        }
-                    );
-
-    log( "    Making summary reports..." )
+        if mode[0] + "d" in reports:
+            log( "    Making detailed %s  report..." % mode )
+            xslt_proc(  extended_test_results
+                        , xsl_path( "result_page.xsl" )
+                        , os.path.join( output_dir, "%s_%s" % ( mode, "result_page.html" ) )
+                        , { "links_file": "links.html"
+                            , "mode": mode
+                            , "source": source
+                            , "run_date": run_date 
+                            , "comment_file": comment_file
+                            , "expected_results_file": expected_results_file
+                            , "explicit_markup_file" : failures_markup_file
+                            }
+                        );
+
+
     for mode in ( "developer", "user" ):
-        xslt_proc(  extended_test_results
-                    , xsl_path( "summary_page.xsl" )
-                    , os.path.join( output_dir, "%s_%s" % ( mode, "summary_page.html" ) )
-                    , { "mode" : mode 
-                        , "source": source
-                        , "run_date": run_date 
-                        , "comment_file": comment_file
-                        }
-                    );
-    
-    log( "    Generating expected_results ..." )
-    xslt_proc( extended_test_results
-               , xsl_path( "produce_expected_results.xsl" )
-               , os.path.join( output_dir, "expected_results.xml" )
-               )
+        if mode[0] + "s" in reports:
+            log( "    Making summary %s  report..." % mode )
+            xslt_proc(  extended_test_results
+                        , xsl_path( "summary_page.xsl" )
+                        , os.path.join( output_dir, "%s_%s" % ( mode, "summary_page.html" ) )
+                        , { "mode" : mode 
+                            , "source": source
+                            , "run_date": run_date 
+                            , "comment_file": comment_file
+                            , "explicit_markup_file" : failures_markup_file
+                            }
+                        );
+
+    if "e" in reports:
+        log( "    Generating expected_results ..." )
+        xslt_proc( extended_test_results
+                   , xsl_path( "produce_expected_results.xsl" )
+                   , os.path.join( output_dir, "expected_results.xml" )
+                   )
     
     shutil.copyfile( xsl_path( "master.css" ),  os.path.join( output_dir, "master.css" ) )
 
@@ -242,12 +253,16 @@ def build_experimental_reports( locate_root_dir
                                 , results_dir
                                 , result_file_prefix
                                 , xslt_proc_name
+                                , dont_collect_logs
+                                , reports
                                 ):
     ( run_date ) = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime() )
     test_results_file = os.path.join( results_dir, "test_results.xml" )
-    collect_test_logs( [ os.path.join( locate_root_dir, "libs" ), os.path.join( locate_root_dir, "status" ) ]
-                       , test_results_file
-                       )
+    print "dont_collect_logs: %s" % dont_collect_logs
+    if not dont_collect_logs:
+        collect_test_logs( [ os.path.join( locate_root_dir, "libs" ), os.path.join( locate_root_dir, "status" ) ]
+                           , test_results_file
+                           )
 
     make_result_pages( test_results_file
                        , expected_results_file
@@ -258,6 +273,7 @@ def build_experimental_reports( locate_root_dir
                        , results_dir
                        , result_file_prefix
                        , xslt_proc_name
+                       , reports
                        )
 
 
@@ -270,15 +286,18 @@ def accept_args( args ):
                                                                      , "results-dir="
                                                                      , "results-prefix="
                                                                      , "xsltproc="
+                                                                     , "dont-collect-logs"
+                                                                     , "reports="
                                                                      , "help"
                                                                      ] )
     options = { "--comment": ""
                 , "--expected-results": ""
-                , "--failures-markup": "" }
+                , "--failures-markup": ""
+                , "--reports" : "dd,ud,us,ds,l,p,x" }
     
     map( lambda x: options.__setitem__( x[0], x[1] ), option_pairs )
 
-    if ( options.has_key( "--help" ) or len( options.keys() ) == 3 ):
+    if ( options.has_key( "--help" ) or len( options.keys() ) == 4 ):
         usage()
         sys.exit( 1 )
 
@@ -293,6 +312,8 @@ def accept_args( args ):
              , options[ "--results-dir" ]
              , options[ "--results-prefix" ]
              , options[ "--xsltproc" ]
+             , options.has_key( '--dont-collect-logs' )
+             , options[ "--reports" ].split( "," )
              )
 
 def usage():
@@ -310,6 +331,22 @@ def usage():
 \t--results-prefix    the prefix of -links.html, -fail.html
 \t                    files produced by compiler_status
 \t--xsltproc          the name of xslt processor (msxsl, xalan, libxslt)
+
+                      The XSLT used in report generation uses exsl 
+                      (http:///www.exsl.org). Make sure that specified 
+                      processor supports it.
+
+The following options are useful in debugging:
+
+\t--dont-collect-logs dont collect the test logs
+\t--reports           produce only the specified reports
+\t                        us - user summary
+\t                        ds - developer summary
+\t                        ud - user detailed
+\t                        dd - developer detailed
+\t                        l  - links
+\t                        p  - patches
+\t                        x  - extended results file
     """
 
 def main():

+ 1 - 2
tools/regression/xsl_reports/xsl/add_expected_results.xsl

@@ -45,8 +45,7 @@
       </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//*/mark[ @library=$library and ( @test = $test-name or @test = '*' ) and ( @toolset = $toolset or @toolset = '*' ) ]"/>
-
+      <xsl:variable name="failures_markup" select="$failures_markup//*/mark-failure[ @library=$library and ( @test = $test-name or @test = '*' ) and ( @toolset = $toolset or @toolset = '*' ) ]"/>
       <xsl:variable name="is_new">
          <xsl:choose>
             <xsl:when test="$expected_results_test_case">

+ 52 - 0
tools/regression/xsl_reports/xsl/common.xsl

@@ -0,0 +1,52 @@
+<?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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:exsl="http://exslt.org/common"
+  version="1.0">
+
+  <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>
+
+
+
+</xsl:stylesheet>

+ 358 - 210
tools/regression/xsl_reports/xsl/master.css

@@ -1,117 +1,103 @@
+/* All reports */
+
 body
-{
+    {
     background-color: white;
-}
+    }
 
-.conf-problem
-{
-  font-size: 70%;
-  font-weight: normal;
-}
+span.super
+    {
+    vertical-align: super;
+    font-size:80%;
+    margin-left: 3pt;
+    }
 
 h1.page-title
-{ 
-  text-align: left;
-  text-transform: capitalize;
-  margin-bottom: 10pt;
-}
-
-div.acknowledgement
-{
-  text-align: left;
-  margin-top: 10pt;
-  margin-left: 5pt;
-  margin-bottom: 10pt;
-}
-
-div.purpose
-{ 
-  text-align: left;
-  margin-left: 5pt;
-  margin-top: 10pt;
-}
-
-div.legend
-{ 
-  text-align: left;
-  margin-left: 15pt;
-}
+    { 
+    text-align: left;
+    text-transform: capitalize;
+    margin-bottom: 10pt;
+    }
 
 table.header-table
-{
-  margin-left: 10pt;
-  margin-top: 20pt;
-  margin-bottom: 10pt;
-  width: 800px;
-}
+    {
+    margin-left: 10pt;
+    margin-top: 20pt;
+    margin-bottom: 10pt;
+    width: 800px;
+    }
 
 td.header-item
-{ 
-  text-align: left;
-  vertical-align: top;
-  font-weight: bold;
-}
+    { 
+    text-align: left;
+    vertical-align: top;
+    font-weight: bold;
+    }
 
 td.header-item-content
-{ 
-  padding-left: 20pt;
-  padding-bottom: 10pt;
-}
+    { 
+    padding-left: 20pt;
+    padding-bottom: 10pt;
+    }
 
 td.legend-item
-{ 
+    { 
     padding-left: 5pt;
     padding-top: 2pt;
-}
+    }
 
-div.toc
-{ 
-  margin: 5pt;
-}
-
-li.toc-entry
-{ 
-  margin-left: 5pt;
-  list-style-type: square;
-}
+div.acknowledgement
+    {
+    text-align: left;
+    margin-top: 10pt;
+    margin-left: 5pt;
+    margin-bottom: 10pt;
+    }
 
-div.library-name
-{ 
-  margin-top: 20pt;
-  margin-bottom: 10pt;
-  text-align: left;
-  font-size: 125%;
-  font-weight: bold;
-}
+div.purpose
+    { 
+    text-align: left;
+    margin-left: 5pt;
+    margin-top: 10pt;
+    }
 
-div.footer
-{ 
-  margin: 5px;
-}
+div.legend
+    { 
+    text-align: left;
+    margin-left: 15pt;
+    }
 
- table.summary-table
+div.library-name
+    { 
+    margin-top: 20pt;
+    margin-bottom: 10pt;
+    text-align: left;
+    font-size: 125%;
+    font-weight: bold;
+    }
+
+table.summary-table
 ,table.detail-table
-{ 
-  border-collapse: collapse;
-  border: 2px solid black;
-  margin: 5px;
-}
+    { 
+    border-collapse: collapse;
+    border: 2px solid black;
+    margin: 5px;
+    }
 
  table.summary-table td
 ,table.detail-table td
-{ 
-  text-align: center;
-  border-left: 1px solid black;
-  border-right: 1px solid black;
-}
-
+    { 
+    text-align: center;
+    border-left: 1px solid black;
+    border-right: 1px solid black;
+    }
 
  a.log-link:link
 ,a.log-link:visited
-{
-  color: black; 
+    {
+     color: black; 
 /*  text-decoration: none; */
-}
+    }
 
  a.log-link:active
 ,a.log-link:hover
@@ -119,145 +105,305 @@ div.footer
 ,a.legend-link:visited
 ,a.legend-link:active
 ,a.legend-link:hover
-{
-  color: black; 
-  text-decoration: underline;
-}
-
-table.summary-table td.library-name
-{
-  width: 100pt;
-  padding: 0pt;
-}
-
-table.detail-table td.test-name
-{
-  width: 150pt;
-  padding: 0pt;
-  border-right: 0;
-}
-
-table.detail-table td.test-type
-{
-  padding-right: 5px;
-  border-left: 0;
-  border-right: 0;
-  text-align: right;
-}
-
- td.result-success-expected
-,td.result-fail-expected
-,td.result-user-success
+    {
+    color: black; 
+    text-decoration: underline;
+    }
+
+td.toolset-name
+    {
+    vertical-align: middle;
+    padding-left: 3pt;  
+    padding-right: 3pt;  
+    }
+
+td.required-toolset-name
+    {
+    font-weight: bold;
+    vertical-align: middle;
+    padding-left: 3pt;  
+    padding-right: 3pt;  
+    }
+
+td.detail-corner-case-header
+    {
+    }
+
+tr.summary-row-first td
+, tr.detail-row-first td 
+    {
+    border-top: 1px solid gray;
+    border-bottom: 0px;
+    }
+
+tr.summary-row-last td
+, tr.detail-row-last td 
+    {
+    border-top: 0px;
+    border-bottom: 1px solid gray;
+    }
+
+tr.summary-row-single td
+, tr.detail-row-single td 
+    {
+    border-top: 1px solid gray;
+    border-bottom: 1px solid gray;
+    }
+
+tr.summary-row td
+, tr.detail-row td 
+    {
+    border-bottom: 0px;
+    border-top: 0px; 
+    }
+
+ td.detail-success-expected
+,td.detail-fail-expected
+,td.detail-user-success
 ,td.summary-expected
 ,td.summary-user-fail-expected
 ,td.summary-user-success
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: lightgreen;
-  color: black;
-  border: 0px solid black;
-}
-
- td.result-success-unexpected
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: lightgreen;
+    border-left: 1px solid black;
+    border-right: 1px solid black;
+    padding-left: 2pt;
+    padding-right: 2pt;
+    }
+
+ td.detail-success-unexpected
 ,td.summary-success-unexpected
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: green;
-  font-weight: bold;
-  color: white;
-  border: 0px;
-}
-
- td.summary-fail-unexpected
-,td.summary-user-fail-unexpected
-,td.result-user-fail-unexpected
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: red;
-  color: black;
-  border: 2px solid black; 
-}
-
-td.summary-user-fail-unexpected
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: yellow;
-  color: black;
-  border: 2px solid black; 
-}
-
-td.result-fail-unexpected
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: red;
-  font-weight: bold;
-  color: black;
-  border: 2px solid black; 
-}
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: green;
+    font-weight: bold;
+    color: white;
+    border: 0px;
+    padding-left: 2pt;
+    padding-right: 2pt;
+    }
+
+
+tr.summary-row              td.summary-fail-unexpected
+    , tr.summary-row-first  td.summary-fail-unexpected
+    , tr.summary-row-last   td.summary-fail-unexpected
+    , tr.summary-row-single td.summary-fail-unexpected  
+
+,tr.summary-row             td.summary-user-fail-unexpected    
+    ,tr.summary-row-first   td.summary-user-fail-unexpected
+    ,tr.summary-row-last    td.summary-user-fail-unexpected
+    ,tr.summary-row-simple  td.summary-user-fail-unexpected
+
+,tr.detail-row              td.detail-user-fail-unexpected
+    , tr.detail-row-first   td.detail-user-fail-unexpected
+    , tr.detail-row-last    td.detail-user-fail-unexpected
+    , tr.detail-row-simple  td.detail-user-fail-unexpected
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: red;
+    color: black;
+    border: 2px solid black; 
+    padding-left: 2pt;
+    padding-right: 2pt;
+    }
+
+tr.summary-row                  td.summary-missing
+    , tr.summary-row-first      td.summary-missing
+    , tr.summary-row-last       td.summary-missing
+    , tr.summary-row-single     td.summary-missing
+
+, tr.detail-row                 td.detail-missing
+    , tr.detail-row-first       td.detail-missing
+    , tr.detail-row-last        td.detail-missing
+    , tr.detail-row-single      td.detail-missing
+    {
+    width: 60pt;
+    text-align: center;
+    background-color: white;
+    color: black;
+    border: 2px solid black; 
+    padding-left: 2pt;
+    padding-right: 2pt;
+    }
+
+tr.summary-row td.summary-unusable
+    , tr.summary-row-first  td.summary-unusable
+    , tr.summary-row-last   td.summary-unusable
+    , tr.summary-row-single td.summary-unusable
+
+, tr.detail-row             td.detail-unusable
+    , tr.detail-row-first   td.detail-unusable
+    , tr.detail-row-last    td.detail-unusable
+    , tr.detail-row-single  td.detail-unusable
+    {
+    width: 60pt;  
+    text-align: center;
+    background-color: silver;
+    color: black;
+    border-top: 2px solid black; 
+    border-bottom: 2px solid black; 
+    border-left: 2px solid black; 
+    border-right: 2px solid black; 
+    padding-left: 2pt;
+    padding-right: 2pt;
+    }
+
+/* Summary */
 
-span.result-error
-{ 
-vertical-align: super;
-}
+table.summary-table td.library-name
+    {
+    width: 100pt;
+    padding: 0pt;
+    border-top: 1px solid gray;
+    border-bottom: 1px solid gray;
+    }
+
+tr.summary-row              td.summary-user-fail-unexpected
+    , tr.summary-row-first  td.summary-user-fail-unexpected
+    , tr.summary-row-last   td.summary-user-fail-unexpected
+    , tr.summary-row-single td.summary-user-fail-unexpected
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: yellow;
+    color: black;
+    border: 2px solid black; 
+    padding-left: 2pt;
+    padding-right: 2pt;
+    }
+
+tr.summary-row              td.summary-fail-unexpected-new
+    , tr.summary-row-first  td.summary-fail-unexpected-new
+    , tr.summary-row-last   td.summary-fail-unexpected-new
+    , tr.summary-row-single td.summary-fail-unexpected-new
+
+, tr.detail-row             td.detail-fail-unexpected-new
+    , tr.detail-row-first   td.detail-fail-unexpected-new
+    , tr.detail-row-last    td.detail-fail-unexpected-new
+    , tr.detail-row-single  td.detail-fail-unexpected-new 
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: yellow;
+    color: black;
+    border: 2px solid black; 
+    }
+
+/* Detailed */
+
+.detail-conf-problem
+    {
+    font-size: 70%;
+    font-weight: normal;
+    }
+
+div.detail-toc
+    { 
+    margin: 5pt;
+    }
+
+
+li.detail-toc-entry
+    { 
+    margin-left: 5pt;
+    list-style-type: square;
+    }
+
+
+div.detail-footer
+    { 
+    margin: 5px;
+    }
 
-td.summary-fail-unexpected-new
-, td.result-fail-unexpected-new
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: yellow;
-  color: black;
-  border: 2px solid black; 
-}
 
-td.summary-missing
-, td.result-missing
-{
-  width: 60pt;
-  text-align: center;
-  background-color: white;
-  color: black;
-  border: 2px solid black; 
-}
+table.detail-table td.test-name
+    {
+    width: 150pt;
+    padding-left: 6pt;
+    padding-right: 6pt;
+    border-right: 0;
+    border-top: 1px solid gray;
+    border-bottom: 1px solid gray;
+    }
 
-td.result-user-fail-expected
-{ 
-  width: 60pt;
-  text-align: center;
-  background-color: yellow;
-  color: black;
-  border: 0px solid black; 
-}
+table.detail-table td.test-type
+    {
+    padding-right: 5px;
+    border-left: 0;
+    border-right: 0;
+    border-top: 1px solid gray;
+    border-bottom: 1px solid gray;
+    text-align: right;
+    }
+
+tr.detail-row td.detail-fail-unexpected
+    , tr.detail-row-first td.detail-fail-unexpected
+    , tr.detail-row-last td.detail-fail-unexpected
+    , tr.detail-row-single td.detail-fail-unexpected
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: red;
+    font-weight: bold;
+    color: black;
+    border: 2px solid black; 
+    }
+
+td.detail-user-fail-expectected
+    { 
+    width: 60pt;
+    text-align: center;
+    background-color: yellow;
+    color: black;
+    border: 0px solid black; 
+    }
+
+table.detail-library-notes
+    {
+    background-color: LemonChiffon;
+    width: 640px;
+    margin-left: 5px;
+    margin-right: 5px; 
+    }
+
+tr.detail-library-note
+    {
+    }
+
+span.detail-library-note-header
+    {
+    font-weight: bold;
+    }
+
+/* Log */
 
 div.log-test-title
-{
-  font-size: 1.5em;
-  font-weight: bold;
-  border-bottom: 1px solid black;
-}
+    {
+    font-size: 1.5em;
+    font-weight: bold;
+    border-bottom: 1px solid black;
+    }
 
 div.log-notes-title
-{
-  font-weight: bold;
-  background-color:#FFFFCC;
-}
-
+    {
+    font-weight: bold;
+    background-color:#FFFFCC;
+    }
 
 div.log-notes
-{
-  padding: 3pt;
-  background-color:#FFFFCC;
-}
+    {
+    padding: 3pt;
+    background-color:#FFFFCC;
+    }
 
 div.log-compiler-output-title
-{
-  font-weight: bold;
-}
+    {
+    font-weight: bold;
+    }
 
 div.log-linker-output-title
 {
@@ -269,3 +415,5 @@ div.log-run-output-title
   font-weight: bold;
 }
 
+
+

+ 264 - 80
tools/regression/xsl_reports/xsl/result_page.xsl

@@ -13,7 +13,12 @@
 
 -->
 
-<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:exsl="http://exslt.org/common"
+  version="1.0">
+
+  <xsl:import href="common.xsl"/>
 
   <xsl:output method="html" 
     doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
@@ -21,16 +26,19 @@
     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" 
@@ -42,16 +50,58 @@
     use="@library"/>
   <xsl:key name="toolset_key" match="test-log" use="@toolset"/>
 
-  <!-- -->
-  <xsl:variable name="toolsets" select="//test-log[ @toolset != '' and generate-id(.) = generate-id( key('toolset_key',@toolset)[1] )]/@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="libraries" select="//test-log[ @library != '' and generate-id(.) = generate-id( key('library_key',@library)[1] )  ]/@library"/>
 
-  <xsl:template name="toolsets_row">
-    <tr>
+  <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:for-each select="$toolsets">
-        <xsl:sort select="." order="ascending" />
-        <td class="toolset-name"><xsl:value-of select="."/></td>
+
+      <xsl:variable name="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>
+          
+        <td class="{$class}"><xsl:value-of select="$toolset"/>
+          <xsl:if test="$library_notes">
+            <span class="super">
+              <xsl:for-each select="$library_notes">
+                <xsl:if test="../@toolset=$toolset or ( ../toolset/@name=$toolset or ../toolset/@name = '*' )">
+                  <xsl:variable name="note_index" select="position()"/>
+                  <a href="#{$library}-note-{$note_index}" title="Note {$note_index}"><xsl:value-of select="$note_index"/></a>
+                </xsl:if>
+              </xsl:for-each>
+            </span>
+          </xsl:if>
+        </td>
       </xsl:for-each>
       <td class="head">toolset / test</td>
     </tr>
@@ -100,24 +150,32 @@
                 <td class="header-item">Legend</td>
                 <td class="header-item-content">
 
-                  <table border="0" class="legend-table">
+                  <table border="0" cellspacing="0" cellpadding="0" class="legend-table" summary="legend table">
                     <tr>
-                      <td><table><tr><td class="result-user-success">pass</td></tr></table></td>
-                      <td class="legend-item">the test passes</td>
+                      <td><table width="100%" summary="success legend"><tr class="detail-row-single"><td class="detail-user-success">pass</td></tr></table></td>
+                      <td class="legend-item">
+                        the test passes
+                      </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="result-user-fail-expected">fail</td></tr></table></td>
+                      <td><table width="100%" summary="fail legend"><tr><td class="detail-user-fail-expected">fail</td></tr></table></td>
                       <td class="legend-item">
                         a known test failure; click on the link to see the log
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="result-user-fail-unexpected">unexp.</td></tr></table></td>
+                      <td><table width="100%" summary="unexpected fail legend"><tr><td class="detail-user-fail-unexpected">unexp.</td></tr></table></td>
                       <td class="legend-item">
                         the test is known to pass, but is currently failing; 
                         click on the link to see the log
                       </td>
                     </tr>
+                    <tr>
+                      <td><table width="100%" summary="unusable legend"><tr><td class="detail-unusable">...</td></tr></table></td>
+                      <td class="legend-item">
+                        the library author marked it as unusable on particular platform/toolset
+                      </td>
+                    </tr>
                   </table>
 
                 </td>
@@ -127,34 +185,42 @@
               <tr>
                 <td class="header-item">Legend</td>
                 <td class="header-item-content">
-                  <table border="0" class="legend-table">
+                  <table border="0" class="legend-table" summary="legend">
                     <tr>
-                      <td><table><tr><td class="result-success-expected">pass</td></tr></table></td>
-                      <td>
+                      <td><table width="100%" summary="success legend"><tr class="detail-row-single"><td class="detail-success-expected">pass</td></tr></table></td>
+                      <td class="legend-item">
                         success
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="result-success-unexpected">pass</td></tr></table></td>
-                      <td>
+                      <td><table width="100%" summary="unexpected pass legend"><tr class="detail-row-single"><td class="detail-success-unexpected">pass</td></tr></table></td>
+                      <td class="legend-item">
                         unexpected success
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="result-fail-expected">fail</td></tr></table></td>
-                      <td>
+                      <td><table width="100%" summary="expected fail legend"><tr class="detail-row-single"><td class="detail-fail-expected">fail</td></tr></table></td>
+                      <td class="legend-item">
                         expected failure
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="result-fail-unexpected-new">fail</td></tr></table></td>
+                      <td><table width="100%" summary="unexpected new fail legend"><tr class="detail-row-single"><td class="detail-fail-unexpected-new">fail</td></tr></table></td>
                       <td class="legend-item">
                         failure on a newly added test/compiler
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="result-fail-unexpected">fail</td></tr></table></td>
-                      <td>unexpected failure</td>
+                      <td><table width="100%" summary="unexpected fail legend"><tr class="detail-row-single"><td class="detail-fail-unexpected">fail</td></tr></table></td>
+                      <td class="legend-item">
+                        unexpected failure
+                      </td>
+                    </tr>
+                    <tr>
+                      <td><table width="100%" summary="unusable legend"><tr class="detail-row-single"><td class="detail-unusable">...</td></tr></table></td>
+                      <td class="legend-item">
+                        the library author marked it as unusable on particular platform/toolset
+                      </td>
                     </tr>
                   </table>
                 </td>
@@ -164,7 +230,7 @@
         </xsl:variable>
 
         <div>
-          <table border="0">
+          <table border="0" summary="report header">
             <tr>
               <td><img border="0" src="../c++boost.gif" width="277" height="86" alt="Boost logo"></img></td>
               <td>
@@ -181,7 +247,7 @@
               </td>
             </tr>
           </table>
-          <table border="0" class="header-table">
+          <table border="0" class="header-table" summary="report description" >
             <tr>
               <td class="header-item">Purpose</td>
               <td class="header-item-content">
@@ -192,28 +258,18 @@
             <xsl:copy-of select="$legend"/>
           </table>
           <div class="legend">
-            To specify the expected failures for specific test cases create an .xml file 
-            "boost/status/&lt;your library&gt;/expected_results.xml" along these lines:
-<pre>
-&lt;expected-failures&gt;
-&lt;!-- Example:
-&lt;test-result library="mpl" test-name="is_sequence" toolset="bcc-5.5.1" /&gt;
-&lt;test-result library="mpl" test-name="is_sequence" toolset="cwpro-8.3" /&gt;
---&gt;
-            
-&lt;/expected-failures&gt;
-</pre>
+            To specify the explicit markup edit status/explicit-failure-markup.xml
          </div>
       </div>
 
       <!-- TOC -->
-      <div class="toc">
+      <div class="detail-toc">
         <a name="toc"></a>
         <ul>
           <xsl:for-each select="$libraries">
             <xsl:sort select="." order="ascending" />
-            <li class="toc-entry">
-              <a href="#{.}" class="toc-entry">
+            <li class="detail-toc-entry">
+              <a href="#{.}" class="detail-toc-entry">
                 <xsl:value-of select="."/>
               </a>
             </li>
@@ -231,56 +287,132 @@
             </a>
           </div>
 
-          <table border="1" cellspacing="0" cellpadding="0" class="detail-table">
+          <xsl:variable name="library_marks" select="$explicit_markup//mark-library[ @name = $library ]"/>
+
+          <table border="0" cellspacing="0" cellpadding="0" class="detail-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>
 
-            <thead><xsl:call-template name="toolsets_row"/></thead>
-            <tfoot><xsl:call-template name="toolsets_row"/></tfoot>
-      
             <tbody>
               <xsl:variable name="lib_tests" select="//test-log[@library = $library]" />
               <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//mark-test[ @as='corner case' and @library = $library ]"/>
+              
+              <xsl:variable name="lib_general_tests" select="$lib_unique_test_names[ not( @test-name = $lib_corner_case_tests_markup/@test )  ]"/>
+
+              <xsl:variable name="lib_corner_case_tests" select="$lib_unique_test_names[ @test-name = $lib_corner_case_tests_markup/@test ] " />
             
-              <xsl:for-each select="$lib_unique_test_names">
+              <xsl:for-each select="$lib_general_tests">
                 <xsl:variable name="test_name" select="./@test-name"/>
-                <xsl:variable name="test_program" select="./@test-program"/>
-                <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 name="line_mod">
+                  <xsl:choose>
+                    <xsl:when test="1 = last()">
+                      <xsl:text>-single</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="generate-id( . ) = generate-id( $lib_general_tests[1] )">
+                      <xsl:text>-first</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="generate-id( . ) = generate-id( $lib_general_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="test_results" select="$lib_tests[ @test-name = $test_name ]"/>
+                  <xsl:with-param name="toolsets" select="$ordered_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:if test="count( $lib_corner_case_tests ) > 0">
                 <tr>
-                  <xsl:copy-of select="$test_header"/>
-                  <xsl:call-template name="test_type_col"/>
+                  <!--<td colspan="2">&#160;</td>                  -->
+                  <td class="detail-corner-case-header" colspan="{count($ordered_toolsets) + 3 }" align="center">Corner-case tests</td>
+                  <!--<td>&#160;</td>-->
+                </tr>
+                
+                <xsl:for-each select="$lib_corner_case_tests">
+                  <xsl:variable name="test_name" select="@test-name"/>
 
-                  <xsl:for-each select="$toolsets">
-                    <xsl:sort select="@toolset" order="ascending" />
-                    <xsl:variable name="toolset" select="." />
-                    <xsl:variable name="test-result" select="$lib_tests[ @test-name = $test_name and @toolset=$toolset]"/>
+                  <xsl:variable name="line_mod">
                     <xsl:choose>
-                      <xsl:when test="$mode='user'">
-                        <xsl:call-template name="insert_cell_user">
-                          <xsl:with-param name="test_log" select="$test-result"/>
-                          <xsl:with-param name="log_link" select="concat( $links_file, '#', $test_name, '-', $toolset )"/>
-                        </xsl:call-template>
+                      <xsl:when test="1 = last()">
+                        <xsl:text>-single</xsl:text>
+                      </xsl:when>
+                      <xsl:when test="generate-id( . ) = generate-id( $lib_general_tests[1] )">
+                        <xsl:text>-first</xsl:text>
                       </xsl:when>
-                      <xsl:when test="$mode='developer'">
-                        <xsl:call-template name="insert_cell_developer">
-                          <xsl:with-param name="test_log" select="$test-result"/>
-                          <xsl:with-param name="log_link" select="concat( $links_file, '#', $test_name, '-', $toolset )"/>
-                        </xsl:call-template>
+                      <xsl:when test="generate-id( . ) = generate-id( $lib_general_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="test_results" select="$lib_tests[ @test-name = $test_name ]"/>
+                    <xsl:with-param name="toolsets" select="$ordered_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:if>
 
-                  </xsl:for-each>
-                  <xsl:copy-of select="$test_header"/>
-                </tr>
-              </xsl:for-each>
             </tbody>
           </table>
-          <div class="footer">
+          <xsl:if test="count( $library_marks ) > 0 ">
+            <table border="0" cellpadding="0" cellspacing="0" class="detail-library-notes" summary="library notes">
+              <xsl:for-each select="$library_marks/note">
+                <tr class="detail-library-note">
+                  <td valign="top" width="3em">
+                    <a name="{$library}-note-{position()}">
+                      <span class="super"><xsl:value-of select="position()"/></span>
+                    </a>
+                  </td>
+                  <td>
+                    <span class="detail-library-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:copy-of select="node()"/>
+                  </td>
+                </tr>
+              </xsl:for-each>
+            </table>
+          </xsl:if>
+          <div class="detail-footer">
             <a href="#toc" class="back-link">toc</a>
             <xsl:text>&#160;|&#160;</xsl:text>
             <a href="{$mode}_summary_page.html" class="back-link">summary</a>
@@ -312,10 +444,13 @@
     <xsl:variable name="class">
       <xsl:choose>
         <xsl:when test="not( $test_log )">
-          <xsl:text>result-missing</xsl:text>
+          <xsl:text>detail-missing</xsl:text>
+        </xsl:when>
+        <xsl:when test="$explicit_markup//mark-library[ @name=$test_log/@library and ( @toolset = $test_log/@toolset or toolset/@name = $test_log/@toolset )  ]">
+          <xsl:text>detail-unusable</xsl:text>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:value-of select="concat( 'result-', $test_log/@result, '-', $test_log/@status, $is_new )"/>
+          <xsl:value-of select="concat( 'detail-', $test_log/@result, '-', $test_log/@status, $is_new )"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
@@ -343,7 +478,7 @@
         </xsl:otherwise>
       </xsl:choose>  
       <xsl:if test="count( $test_log ) > 1" > 
-        <div class="conf-problem">conf.&#160;problem</div>
+        <div class="detail-conf-problem">conf.&#160;problem</div>
       </xsl:if>
     </td>
   </xsl:template>
@@ -356,16 +491,19 @@
     <xsl:variable name="class">
       <xsl:choose>
         <xsl:when test="not( $test_log )">
-          <xsl:text>result-missing</xsl:text>
+          <xsl:text>detail-missing</xsl:text>
+        </xsl:when>
+        <xsl:when test="$explicit_markup//mark-library[ @name=$test_log/@library and ( @toolset = $test_log/@toolset or toolset/@name = $test_log/@toolset )  ]">
+          <xsl:text>detail-unusable</xsl:text>
         </xsl:when>
         <xsl:when test="$test_log[@result='fail' and @status='unexpected']">
-          <xsl:text>result-user-fail-unexpected</xsl:text>
+          <xsl:text>detail-user-fail-unexpected</xsl:text>
         </xsl:when>
         <xsl:when test="$test_log[ @result='fail' and @status='expected' ]">
-        <xsl:text>result-user-fail-expected</xsl:text>
+        <xsl:text>detail-user-fail-expected</xsl:text>
       </xsl:when>
       <xsl:when test="$test_log[ @result='success']">
-        <xsl:text>result-user-success</xsl:text>
+        <xsl:text>detail-user-success</xsl:text>
       </xsl:when>
       <xsl:otherwise>
         <xsl:message terminate="yes">
@@ -402,5 +540,51 @@
     </td>
   </xsl:template>
 
+  <xsl:template name="insert-test-line">
+    <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="detail-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" />
+
+        <xsl:variable name="test_result_for_toolset" select="$test_results[ @toolset = $toolset ]"/>
+        <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="concat( $links_file, '#', $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:call-template>
+          </xsl:when>
+        </xsl:choose>
+        
+      </xsl:for-each>
+      <xsl:copy-of select="$test_header"/>
+    </tr>
+  </xsl:template>
+
 
 </xsl:stylesheet>

+ 140 - 30
tools/regression/xsl_reports/xsl/summary_page.xsl

@@ -14,18 +14,25 @@
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:exsl="http://exslt.org/common"
   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 )"/>
 
   <xsl:variable name="alternate_mode">
     <xsl:choose>
@@ -45,21 +52,36 @@
     use="@library"/>
   <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="libraries" select="//test-log[ generate-id(.) = generate-id( key('library_key',@library)[1] ) and @library != '' ]/@library"/>
 
-  <xsl:template name="toolsets_row">
-    <tr>
-      <td class="head">library / toolset</td>
-      <xsl:for-each select="$toolsets">
+  <xsl:variable name="sorted_libraries_output">
+      <xsl:for-each select="$libraries">
         <xsl:sort select="." order="ascending" />
-        <td class="toolset-name"><xsl:value-of select="."/></td>
+        <library><xsl:copy-of select="."/></library>
       </xsl:for-each>
-      <td class="head">toolset / library</td>
-    </tr>
-  </xsl:template>
+  </xsl:variable>
 
+  <xsl:variable name="sorted_libraries" select="exsl:node-set( $sorted_libraries_output )/library/@library"/>
+
+  
   <xsl:template match="/">
     <html>
       <head>
@@ -86,22 +108,28 @@
                 <td class="header-item-content">
                   <table border="0" class="legend-table">
                     <tr>
-                      <td><table><tr><td class="summary-user-success">&#160;</td></tr></table></td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-user-success">&#160;</td></tr></table></td>
                       <td class="legend-item">all library tests are passing</td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="summary-user-fail-expected">details</td></tr></table></td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-user-fail-expected">details</td></tr></table></td>
                       <td class="legend-item">
                         there are some known failures in the tests, see the detailed report
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="summary-user-fail-unexpected">unexp.</td></tr></table></td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-user-fail-unexpected">unexp.</td></tr></table></td>
                       <td class="legend-item">
                         some tests that the library author expects to pass are currently failing,
                         see the detailed report
                       </td>
                     </tr>
+                    <tr>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-unusable">unusable</td></tr></table></td>
+                      <td class="legend-item">
+                        the library author marked it as unusable on particular platform/toolset
+                      </td>
+                    </tr>
                   </table>
                 </td>
               </tr>
@@ -121,28 +149,36 @@
                 <td class="header-item-content">
                   <table border="0" class="legend-table">
                     <tr>
-                      <td><table><tr><td class="summary-expected">OK</td></tr></table></td>
-                      <td class="legend-item">all expected tests pass</td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-expected">OK</td></tr></table></td>
+                      <td class="legend-item">
+                        all expected tests pass
+                      </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="summary-success-unexpected">OK</td></tr></table></td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-success-unexpected">OK</td></tr></table></td>
                       <td class="legend-item">
                         all expected tests pass, and some other tests that were expected to fail 
                         unexpectedly pass as well
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="summary-fail-unexpected-new">fail</td></tr></table></td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-fail-unexpected-new">fail</td></tr></table></td>
                       <td class="legend-item">
                         there are some failures on the newly added tests/compiler(s)
                       </td>
                     </tr>
                     <tr>
-                      <td><table><tr><td class="summary-fail-unexpected">broken</td></tr></table></td>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-fail-unexpected">broken</td></tr></table></td>
                       <td class="legend-item">
                         tests that the library author expects to pass are currently failing
                       </td>
                     </tr>
+                    <tr>
+                      <td><table width="100%"><tr class="summary-row-single"><td class="summary-unusable">unusable</td></tr></table></td>
+                      <td class="legend-item">
+                        the library author marked it as unusable on particular platform/toolset
+                      </td>
+                    </tr>
                   </table>
                 </td>
               </tr>
@@ -174,40 +210,67 @@
 
         <!-- summary table -->
 
-        <table border="1" cellspacing="0" cellpadding="0" class="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>
 
-          <thead><xsl:call-template name="toolsets_row"/></thead>
-          <tfoot><xsl:call-template name="toolsets_row"/></tfoot>
+          <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-log"/>
+
             <!-- for each library -->
-            <xsl:for-each select="$libraries">
-              <xsl:sort select="." order="ascending" />
+            <xsl:for-each select="$sorted_libraries">
               <xsl:variable name="library" select="."/>
-              <xsl:variable name="current_row" select="//test-log[ @library=$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="{$mode}_result_page.html#{.}" class="library-link">
-                    <xsl:value-of select="."/>
+                    <xsl:value-of select="$library"/>
                   </a>
                 </td>
               </xsl:variable>
 
-              <tr class="summary-row">
-                <xsl:copy-of select="$library_header"/>
+              <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>
 
-                <xsl:for-each select="$toolsets">
-                  <xsl:sort select="." order="ascending" />
-                  <xsl:variable name="toolset" select="."/>
 
+              <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>
@@ -215,6 +278,7 @@
                       <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>
@@ -239,9 +303,13 @@
 <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:choose> 
+      <xsl:when test="$explicit_markup//mark-library[ @name = $library and @as='unusable' and (@toolset=$toolset or toolset/@name=$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>
@@ -257,11 +325,19 @@
       <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>
   
   <td class="{$class}">
     <xsl:choose>
+      <xsl:when test="$class='summary-unusable'">
+        <a href="{$mode}_result_page.html#{$library}" class="log-link">
+          <xsl:text>unusable</xsl:text>
+        </a>          
+      </xsl:when>
       <xsl:when test="$class='summary-missing'">
         <xsl:text>missing</xsl:text>
       </xsl:when>
@@ -288,9 +364,13 @@
 <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="$explicit_markup//mark-library[ @name = $library and @as='unusable' and (@toolset=$toolset or toolset/@name=$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>
@@ -315,6 +395,12 @@
   
   <td class="{$class}">
     <xsl:choose>
+      <xsl:when test="$class='summary-unusable'">
+        <a href="{$mode}_result_page.html#{$library}" class="log-link">
+          <xsl:text>unusable</xsl:text>
+        </a>          
+      </xsl:when>
+
       <xsl:when test="$class='summary-missing'">
         <xsl:text>missing</xsl:text>
       </xsl:when>
@@ -339,4 +425,28 @@
   
 </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号