]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/make_rule.py
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / tools / build / test / make_rule.py
1 #!/usr/bin/python
2
3 # Copyright 2003 Dave Abrahams
4 # Copyright 2003, 2006 Vladimir Prus
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 # Test the 'make' rule.
9
10 import BoostBuild
11 import string
12
13 t = BoostBuild.Tester(pass_toolset=1)
14
15 t.write("jamroot.jam", """\
16 import feature ;
17 feature.feature test_feature : : free ;
18
19 import toolset ;
20 toolset.flags creator STRING : <test_feature> ;
21
22 actions creator
23 {
24 echo $(STRING) > $(<)
25 }
26
27 make foo.bar : : creator : <test_feature>12345678 ;
28 """)
29
30 t.run_build_system()
31 t.expect_addition("bin/foo.bar")
32 t.fail_test(string.find(t.read("bin/foo.bar"), "12345678") == -1)
33
34
35 # Regression test. Make sure that if a main target is requested two times, and
36 # build requests differ only in incidental properties, the main target is
37 # created only once. The bug was discovered by Kirill Lapshin.
38 t.write("jamroot.jam", """\
39 exe a : dir//hello1.cpp ;
40 exe b : dir//hello1.cpp/<hardcode-dll-paths>true ;
41 """)
42
43 t.write("dir/jamfile.jam", """\
44 import common ;
45 make hello1.cpp : hello.cpp : common.copy ;
46 """)
47
48 t.write("dir/hello.cpp", "int main() {}\n")
49
50 # Show only action names.
51 t.run_build_system(["-d1", "-n"])
52 t.fail_test(t.stdout().count("copy") != 1)
53
54 t.cleanup()