Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48650 - in trunk/tools/build/v2: test tools
From: jurko.gospodnetic_at_[hidden]
Date: 2008-09-07 04:45:40


Author: jurko
Date: 2008-09-07 04:45:39 EDT (Sun, 07 Sep 2008)
New Revision: 48650
URL: http://svn.boost.org/trac/boost/changeset/48650

Log:
Added a regression test for and fixed a bug causing Boost Build's action timing rule not to work correctly if triggered on targets containing spaces in their name.
Text files modified:
   trunk/tools/build/v2/test/timedata.py | 36 +++++++++++++++++++++++++++++++++++-
   trunk/tools/build/v2/tools/testing.jam | 4 ++--
   2 files changed, 37 insertions(+), 3 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-09-07 04:45:39 EDT (Sun, 07 Sep 2008)
@@ -85,7 +85,7 @@
 ################################################################################
 
 def boost_build_testing_support_timing_rule():
- """Tests the target build timing rule profided by the Boost Build tasting
+ """Tests the target build timing rule provided by the Boost Build testing
     support system.
     """
 
@@ -112,6 +112,39 @@
 
 ################################################################################
 #
+# boost_build_testing_support_timing_rule_with_spaces_in_names()
+# --------------------------------------------------------------
+#
+################################################################################
+
+def boost_build_testing_support_timing_rule_with_spaces_in_names():
+ """Tests the target build timing rule provided by the Boost Build testing
+ support system when used with targets contining spaces in their names.
+ """
+
+ t = BoostBuild.Tester()
+
+ t.write("aaa bbb.cpp", "int main() {}\n")
+
+ t.write("jamroot.jam", """
+import testing ;
+exe "my exe" : "aaa bbb.cpp" ;
+time "my time" : "my exe" ;
+""")
+
+ t.run_build_system()
+ t.expect_addition("bin/$toolset/debug/aaa bbb.obj")
+ t.expect_addition("bin/$toolset/debug/my exe.exe")
+ t.expect_addition("bin/$toolset/debug/my time.time")
+
+ t.expect_content_line("bin/$toolset/debug/my time.time", "user: *")
+ t.expect_content_line("bin/$toolset/debug/my time.time", "system: *")
+
+ t.cleanup()
+
+
+################################################################################
+#
 # main()
 # ------
 #
@@ -119,3 +152,4 @@
 
 basic_jam_action_test()
 boost_build_testing_support_timing_rule()
+boost_build_testing_support_timing_rule_with_spaces_in_names()
\ No newline at end of file

Modified: trunk/tools/build/v2/tools/testing.jam
==============================================================================
--- trunk/tools/build/v2/tools/testing.jam (original)
+++ trunk/tools/build/v2/tools/testing.jam 2008-09-07 04:45:39 EDT (Sun, 07 Sep 2008)
@@ -580,6 +580,6 @@
     echo user: $(USER_TIME)
     echo system: $(SYSTEM_TIME)
 
- echo user: $(USER_TIME)" seconds" > $(<)
- echo system: $(SYSTEM_TIME)" seconds" >> $(<)
+ echo user: $(USER_TIME)" seconds" > "$(<)"
+ echo system: $(SYSTEM_TIME)" seconds" >> "$(<)"
 }


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