Boost logo

Boost-Commit :

From: jurko.gospodnetic_at_[hidden]
Date: 2008-08-04 13:58:53


Author: jurko
Date: 2008-08-04 13:58:53 EDT (Mon, 04 Aug 2008)
New Revision: 47970
URL: http://svn.boost.org/trac/boost/changeset/47970

Log:
Minor stylistic changes made to the Boost Build test/clean.py test script. Corrected the second test case the --clean option was getting tested instead of --clean-all.

  See the trac ticket http://zigzag.lvk.cs.msu.su:7813/boost.build/ticket/198 on what still needs to be improved with this test.
Text files modified:
   trunk/tools/build/v2/test/clean.py | 50 +++++++++++++++------------------------
   1 files changed, 19 insertions(+), 31 deletions(-)

Modified: trunk/tools/build/v2/test/clean.py
==============================================================================
--- trunk/tools/build/v2/test/clean.py (original)
+++ trunk/tools/build/v2/test/clean.py 2008-08-04 13:58:53 EDT (Mon, 04 Aug 2008)
@@ -5,21 +5,19 @@
 # accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
-from BoostBuild import Tester, List
-import string
+import BoostBuild
 
-t = Tester()
+t = BoostBuild.Tester()
 
-t.write("a.cpp", """
+t.write("a.cpp", """
 int main() {}
-
 """)
 
-t.write("Jamroot", """
-exe a : a.cpp sub1//sub1 sub2//sub2 sub3//sub3 ;
+t.write("jamroot.jam", """
+exe a : a.cpp sub1//sub1 sub2//sub2 sub3//sub3 ;
 """)
 
-t.write("sub1/Jamfile", """
+t.write("sub1/jamfile.jam", """
 lib sub1 : sub1.cpp sub1_2 ../sub2//sub2 ;
 lib sub1_2 : sub1_2.cpp ;
 """)
@@ -29,7 +27,6 @@
 __declspec(dllexport)
 #endif
 void sub1() {}
-
 """)
 
 t.write("sub1/sub1_2.cpp", """
@@ -37,12 +34,10 @@
 __declspec(dllexport)
 #endif
 void sub1() {}
-
 """)
 
-
-t.write("sub2/Jamfile", """
-lib sub2 : sub2.cpp ;
+t.write("sub2/jamfile.jam", """
+lib sub2 : sub2.cpp ;
 """)
 
 t.write("sub2/sub2.cpp", """
@@ -50,11 +45,10 @@
 __declspec(dllexport)
 #endif
 void sub2() {}
-
 """)
 
-t.write("sub3/Jamroot", """
-lib sub3 : sub3.cpp ;
+t.write("sub3/jamroot.jam", """
+lib sub3 : sub3.cpp ;
 """)
 
 t.write("sub3/sub3.cpp", """
@@ -62,11 +56,10 @@
 __declspec(dllexport)
 #endif
 void sub3() {}
-
 """)
 
 
-# The 'clean' should not remove files under separate Jamroot.
+# The 'clean' should not remove files under separate jamroot.jam.
 t.run_build_system()
 t.run_build_system("--clean")
 t.expect_removal("bin/$toolset/debug/a.obj")
@@ -77,15 +70,14 @@
 
 # The 'clean-all' removes everything it can reach.
 t.run_build_system()
-t.run_build_system("--clean")
+t.run_build_system("--clean-all")
 t.expect_removal("bin/$toolset/debug/a.obj")
 t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
 t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
 t.expect_removal("sub2/bin/$toolset/debug/sub2.obj")
 t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
 
-# The 'clean' together with project target removes
-# only under that probject
+# The 'clean' together with project target removes only under that project.
 t.run_build_system()
 t.run_build_system("sub1 --clean")
 t.expect_nothing("bin/$toolset/debug/a.obj")
@@ -94,7 +86,7 @@
 t.expect_nothing("sub2/bin/$toolset/debug/sub2.obj")
 t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
 
-# And clean-all removes everything.
+# And 'clean-all' removes everything.
 t.run_build_system()
 t.run_build_system("sub1 --clean-all")
 t.expect_nothing("bin/$toolset/debug/a.obj")
@@ -103,9 +95,8 @@
 t.expect_removal("sub2/bin/$toolset/debug/sub2.obj")
 t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
 
-# If main target is explicitly named, we should not remove
-# files from other targets.
-
+# If main target is explicitly named, we should not remove files from other
+# targets.
 t.run_build_system()
 t.run_build_system("sub1//sub1 --clean")
 t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
@@ -113,18 +104,15 @@
 t.expect_nothing("sub2/bin/$toolset/debug/sub2.obj")
 t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
 
-
-# Regression test: sources of the 'cast' rule were mistakenly
-# deleted.
+# Regression test: sources of the 'cast' rule were mistakenly deleted.
 t.rm(".")
-t.write("Jamroot", """
+t.write("jamroot.jam", """
 import cast ;
 cast a cpp : a.h ;
 """)
 t.write("a.h", "")
-
 t.run_build_system("--clean")
 t.expect_nothing("a.h")
 
-t.cleanup()
 
+t.cleanup()


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