summaryrefslogtreecommitdiff
path: root/tools/build/test/abs_workdir.py
blob: fa6aadc5876abde79a20220024c39bd95ca5fc15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Niklaus Giger, 2005-03-15
# 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 tempfile

t = BoostBuild.Tester(["-ffile.jam"], workdir=os.getcwd(), pass_d0=False,
    pass_toolset=False)

t.write("file.jam", "EXIT [ PWD ] : 0 ;")

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)

t.cleanup()