$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: jurko.gospodnetic_at_[hidden]
Date: 2008-01-08 23:15:35
Author: jurko
Date: 2008-01-08 23:15:35 EST (Tue, 08 Jan 2008)
New Revision: 42630
URL: http://svn.boost.org/trac/boost/changeset/42630
Log:
Fixed a failing test by making it access action output using the __ACTION_RULE__ rule so it would not be affected by the level of debug output given by Boost Build/Jam.
Text files modified: 
   trunk/tools/build/v2/test/timedata.py |    34 +++++++++++++++++++++-------------      
   1 files changed, 21 insertions(+), 13 deletions(-)
Modified: trunk/tools/build/v2/test/timedata.py
==============================================================================
--- trunk/tools/build/v2/test/timedata.py	(original)
+++ trunk/tools/build/v2/test/timedata.py	2008-01-08 23:15:35 EST (Tue, 08 Jan 2008)
@@ -6,52 +6,60 @@
 # This tests the build step timing facilities.
 
 import BoostBuild
+import re
 
 t = BoostBuild.Tester(pass_toolset=0)
 
-t.write('file.jam', '''
+t.write("file.jam", """
 rule time
 {
     DEPENDS $(<) : $(>) ;
     __TIMING_RULE__ on $(>) = record_time $(<) ;
     DEPENDS all : $(<) ;
 }
+
 actions time
 {
     echo $(>) user: $(__USER_TIME__) system: $(__SYSTEM_TIME__)
     echo timed from $(>) >> $(<)
 }
 
+rule display-action-output ( args * : target : command status start end user system : output-lines * )
+{
+    for local line in $(output-lines)
+    {
+        ECHO $(line) ;
+    }
+}
+
 rule record_time ( target : source : start end user system )
 {
-    ECHO record_time called: $(target) / $(source) / $(user) / $(system) ;
-    __USER_TIME__ on $(target) = $(user) ;
+    __USER_TIME__   on $(target) = $(user) ;
     __SYSTEM_TIME__ on $(target) = $(system) ;
+    __ACTION_RULE__ on $(target) = display-action-output ;
 }
 
 rule make
 {
     DEPENDS $(<) : $(>) ;
 }
+
 actions make
 {
     echo made from $(>) >> $(<)
 }
 
-
 time foo : bar ;
 make bar : baz ;
-''')
+""")
 
-import re
-t.write('baz', 'nothing\n')
+t.write("baz", "nothing\n")
 t.run_build_system(
-    '-ffile.jam',
-    stdout=r'bar +user: [0-9\.]+ +system: +[0-9\.]+ *$',
-    match = lambda actual,expected: re.search(expected,actual,re.DOTALL)
-    )
-t.expect_addition('foo')
-t.expect_addition('bar')
+    "-ffile.jam",
+    stdout=r"bar +user: [0-9.]+ +system: +[0-9.]+ *$",
+    match=lambda actual,expected: re.search(expected,actual,re.DOTALL))
+t.expect_addition("foo")
+t.expect_addition("bar")
 t.expect_nothing_more()
 
 t.cleanup()