2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-01 08:22:15 +00:00
Files
build/test/abs_workdir.py
Jurko Gospodnetić 5ab291e73a Simple code cleanup. Typo corrections.
[SVN r42547]
2008-01-06 20:37:55 +00:00

35 lines
769 B
Python

# Niklaus Giger, 2005-03-15
# Testing whether we may run a test in a absolute directories
# There are no tests for temporary directories as this is implictly tested in a lot of other cases
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)
if 'TMP' in os.environ:
tmp_dir = os.environ.get('TMP')
else:
tmp_dir = "/tmp"
if string.rfind(t.stdout(), tmp_dir) != -1:
t.fail_test(1)
if string.rfind(t.stdout(), 'build/v2/test') == -1:
t.fail_test(1)
t.run_build_system(status=1, subdir="/must/fail/with/absolute/path",
stderr=None)
t.cleanup