Boost logo

Boost-Commit :

From: agurtovoy_at_[hidden]
Date: 2007-10-30 03:25:28


Author: agurtovoy
Date: 2007-10-30 03:25:27 EDT (Tue, 30 Oct 2007)
New Revision: 40599
URL: http://svn.boost.org/trac/boost/changeset/40599

Log:
xsl_reports: display the corresponding run's revision/timestamp on the test output page
Text files modified:
   trunk/tools/regression/xsl_reports/test/generate_test_results.py | 1 +
   trunk/tools/regression/xsl_reports/test/test.py | 2 +-
   trunk/tools/regression/xsl_reports/xsl/v2/html/master.css | 5 +++++
   trunk/tools/regression/xsl_reports/xsl/v2/links_page.xsl | 33 +++++++++++++++++++++++++++------
   4 files changed, 34 insertions(+), 7 deletions(-)

Modified: trunk/tools/regression/xsl_reports/test/generate_test_results.py
==============================================================================
--- trunk/tools/regression/xsl_reports/test/generate_test_results.py (original)
+++ trunk/tools/regression/xsl_reports/test/generate_test_results.py 2007-10-30 03:25:27 EDT (Tue, 30 Oct 2007)
@@ -64,6 +64,7 @@
                                       , "timestamp": common.format_timestamp(
                                                           time.gmtime( time.time() - i_runner * 24*60*60 )
                                                         )
+ , "revision": '%d' % ( 7000 + i_runner )
                                       , "source": test_run_source( i_runner )
                                       , "run-type": test_run_type( i_runner )
                                       } )

Modified: trunk/tools/regression/xsl_reports/test/test.py
==============================================================================
--- trunk/tools/regression/xsl_reports/test/test.py (original)
+++ trunk/tools/regression/xsl_reports/test/test.py 2007-10-30 03:25:27 EDT (Tue, 30 Oct 2007)
@@ -25,7 +25,7 @@
     , comment_file = os.path.abspath( "comment.html" )
     , results_dir = os.path.abspath( "results" )
     , output_dir = os.path.abspath( "output" )
- , reports = [ "x", "ds", "dd", "dsr", "ddr", "us", "ud", "usr", "udr" ]
+ , reports = [ "i", "x", "ds", "dd", "dsr", "ddr", "us", "ud", "usr", "udr" ]
     , warnings = [ 'Warning text 1', 'Warning text 2' ]
     , extended_test_results = os.path.abspath( "output/extended_test_results.xml" )
     , dont_collect_logs = 1

Modified: trunk/tools/regression/xsl_reports/xsl/v2/html/master.css
==============================================================================
--- trunk/tools/regression/xsl_reports/xsl/v2/html/master.css (original)
+++ trunk/tools/regression/xsl_reports/xsl/v2/html/master.css 2007-10-30 03:25:27 EDT (Tue, 30 Oct 2007)
@@ -579,7 +579,12 @@
 {
     font-size: 1.5em;
     font-weight: bold;
+}
+
+div.log-test-header
+{
     border-bottom: 1px solid black;
+ margin-bottom: 5pt;
 }
 
 div.notes-title

Modified: trunk/tools/regression/xsl_reports/xsl/v2/links_page.xsl
==============================================================================
--- trunk/tools/regression/xsl_reports/xsl/v2/links_page.xsl (original)
+++ trunk/tools/regression/xsl_reports/xsl/v2/links_page.xsl 2007-10-30 03:25:27 EDT (Tue, 30 Oct 2007)
@@ -35,6 +35,8 @@
 
     <xsl:variable name="explicit_markup" select="document( $explicit_markup_file )"/>
     <xsl:variable name="runner_id" select="test-run/@runner"/>
+ <xsl:variable name="revision" select="test-run/@revision"/>
+ <xsl:variable name="timestamp" select="test-run/@timestamp"/>
 
     <!-- runs / toolsets -->
     <xsl:variable name="run_toolsets" select="meta:test_structure( /, 'no' )"/>
@@ -99,6 +101,8 @@
                     <xsl:with-param name="path" select="$variants_file_path"/>
                     <xsl:with-param name="test_logs" select="$toolset/*"/>
                     <xsl:with-param name="runner_id" select="$runner_id"/>
+ <xsl:with-param name="revision" select="$revision"/>
+ <xsl:with-param name="timestamp" select="$timestamp"/>
                 </xsl:call-template>
 
                 <xsl:for-each select="str:tokenize( string( ' |_release' ), '|')">
@@ -127,6 +131,8 @@
                         <xsl:with-param name="path" select="$log_file_path"/>
                         <xsl:with-param name="test_log" select="$test_log"/>
                         <xsl:with-param name="runner_id" select="$runner_id"/>
+ <xsl:with-param name="revision" select="$revision"/>
+ <xsl:with-param name="timestamp" select="$timestamp"/>
                     </xsl:call-template>
                     
                     <xsl:for-each select="str:tokenize( string( ' |_release' ), '|')">
@@ -151,7 +157,7 @@
         <xsl:param name="test_logs"/>
         <xsl:variable name="libs" select="set:distinct( $test_logs/@library )"/>
         <xsl:variable name="fragment">
- <runner runner_id="{$test_logs[1]/../@runner}">
+ <runner runner_id="{$test_logs[1]/../@runner}" revision="{$test_logs[1]/../@revision}" timestamp="{$test_logs[1]/../@timestamp}">
                 <xsl:for-each select="$libs">
                     <xsl:variable name="library_name" select="."/>
                     <xsl:variable name="library_test_logs" select="$test_logs[@library=$library_name]"/>
@@ -221,6 +227,8 @@
         <xsl:param name="path"/>
         <xsl:param name="test_logs"/>
         <xsl:param name="runner_id"/>
+ <xsl:param name="revision"/>
+ <xsl:param name="timestamp"/>
         <xsl:message> Writing variants file <xsl:value-of select="$path"/></xsl:message>
         <exsl:document href="{$path}"
             method="html"
@@ -230,6 +238,7 @@
             
             <html>
                 <xsl:variable name="component" select="meta:output_page_header( $test_logs[1], $runner_id )"/>
+ <xsl:variable name="age" select="meta:timestamp_difference( $timestamp, $run_date )"/>
 
                 <head>
                     <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
@@ -237,12 +246,16 @@
                 </head>
 
                 <body>
- <div>
+ <div class="log-test-header">
                         <div class="log-test-title">
                             Test output: <xsl:value-of select="$component"/>
                         </div>
+ <div><span class="timestamp-{$age}">
+ Rev <xsl:value-of select="$revision"/> /
+ <xsl:value-of select="meta:format_timestamp( $timestamp )"/>
+ </span></div>
                     </div>
-
+
                     <div>
                         <b>Report Time: </b> <xsl:value-of select="meta:format_timestamp( $run_date )"/>
                     </div>
@@ -275,6 +288,7 @@
         <xsl:param name="path"/>
         <xsl:param name="test_log"/>
         <xsl:param name="runner_id"/>
+ <xsl:param name="revision"/>
         <xsl:message> Writing log file document <xsl:value-of select="$path"/></xsl:message>
 
         <exsl:document href="{$path}"
@@ -285,6 +299,7 @@
                         
             <html>
                 <xsl:variable name="component" select="meta:output_page_header( $test_log, $runner_id )"/>
+ <xsl:variable name="age" select="meta:timestamp_difference( $timestamp, $run_date )"/>
 
                 <head>
                     <link rel="stylesheet" type="text/css" href="../master.css" title="master" />
@@ -292,10 +307,16 @@
                 </head>
                 
                 <body>
- <div class="log-test-title">
- Test output: <xsl:value-of select="$component"/>
+ <div class="log-test-header">
+ <div class="log-test-title">
+ Test output: <xsl:value-of select="$component"/>
+ </div>
+ <div><span class="timestamp-{$age}">
+ Rev <xsl:value-of select="$revision"/> /
+ <xsl:value-of select="meta:format_timestamp( $timestamp )"/>
+ </span></div>
                     </div>
-
+
                     <div>
                         <b>Report Time: </b> <xsl:value-of select="meta:format_timestamp( $run_date )"/>
                     </div>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk