Imported Upstream version 1.57.0
[platform/upstream/boost.git] / tools / build / test / core_option_n.py
1 #!/usr/bin/python
2
3 # Copyright 2007 Rene Rivera.
4 # Copyright 2011 Steven Watanabe
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8 import BoostBuild
9
10 t = BoostBuild.Tester(pass_toolset=0, pass_d0=False)
11
12 t.write("file.jam", """\
13 actions .a.
14 {
15 echo [$(<:B)] 0
16 echo [$(<:B)] 1
17 echo [$(<:B)] 2
18 }
19
20 rule .a.
21 {
22     DEPENDS $(<) : $(>) ;
23 }
24
25 NOTFILE subtest ;
26 .a. subtest_a : subtest ;
27 .a. subtest_b : subtest ;
28 FAIL_EXPECTED subtest_b ;
29 DEPENDS all : subtest_a subtest_b ;
30 """)
31
32 t.run_build_system(["-ffile.jam", "-n"], stdout="""\
33 ...found 4 targets...
34 ...updating 2 targets...
35 .a. subtest_a
36
37 echo [subtest_a] 0
38 echo [subtest_a] 1
39 echo [subtest_a] 2
40
41 .a. subtest_b
42
43 echo [subtest_b] 0
44 echo [subtest_b] 1
45 echo [subtest_b] 2
46
47 ...updated 2 targets...
48 """)
49 t.expect_nothing_more()
50
51 t.cleanup()