Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79903 - trunk/tools/build/v2/test
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-07 08:22:25


Author: jurko
Date: 2012-08-07 08:22:24 EDT (Tue, 07 Aug 2012)
New Revision: 79903
URL: http://svn.boost.org/trac/boost/changeset/79903

Log:
Cleaned up the 'unused' abs_workdir.py internal Boost Build test a bit. Added related embedded TODO comments.
Text files modified:
   trunk/tools/build/v2/test/abs_workdir.py | 32 ++++++++++++--------------------
   1 files changed, 12 insertions(+), 20 deletions(-)

Modified: trunk/tools/build/v2/test/abs_workdir.py
==============================================================================
--- trunk/tools/build/v2/test/abs_workdir.py (original)
+++ trunk/tools/build/v2/test/abs_workdir.py 2012-08-07 08:22:24 EDT (Tue, 07 Aug 2012)
@@ -2,31 +2,23 @@
 # Testing whether we may run a test in absolute directories. There are no tests
 # for temporary directories as this is implictly tested in a lot of other cases.
 
+# TODO: Move to a separate testing-system test group.
+# TODO: Make the test not display any output on success.
+# TODO: Make sure implemented path handling is correct under Windows, Cygwin &
+# Unix/Linux.
+
 import BoostBuild
 import os
-import string
-
-t = BoostBuild.Tester(arguments="pwd", executable="jam", workdir=os.getcwd(),
- pass_toolset=0)
-
-t.write("jamroot.jam", """
-actions print_pwd { pwd ; }
-print_pwd pwd ;
-ALWAYS pwd ;
-""")
-
-t.run_build_system(status=0)
+import tempfile
 
-if 'TMP' in os.environ:
- tmp_dir = os.environ.get('TMP')
-else:
- tmp_dir = "/tmp"
+t = BoostBuild.Tester(["-ffile.jam"], workdir=os.getcwd(), pass_d0=False,
+ pass_toolset=False)
 
-if string.rfind(t.stdout(), tmp_dir) != -1:
- t.fail_test(1)
+t.write("file.jam", "EXIT [ PWD ] : 0 ;")
 
-if string.rfind(t.stdout(), 'build/v2/test') == -1:
- t.fail_test(1)
+t.run_build_system()
+t.expect_output_lines("*%s*" % tempfile.gettempdir(), False)
+t.expect_output_lines("*build/v2/test*")
 
 t.run_build_system(status=1, subdir="/must/fail/with/absolute/path",
     stderr=None)


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