]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/make_rule.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / make_rule.py
CommitLineData
7c673cae
FG
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
10import BoostBuild
11import string
12
13t = BoostBuild.Tester(pass_toolset=1)
14
15t.write("jamroot.jam", """\
16import feature ;
17feature.feature test_feature : : free ;
18
19import toolset ;
20toolset.flags creator STRING : <test_feature> ;
21
22actions creator
23{
24 echo $(STRING) > $(<)
25}
26
27make foo.bar : : creator : <test_feature>12345678 ;
28""")
29
30t.run_build_system()
b32b8144
FG
31t.expect_addition("bin/$toolset/debug*/foo.bar")
32t.fail_test(string.find(t.read("bin/$toolset/debug*/foo.bar"), "12345678") == -1)
7c673cae
FG
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.
38t.write("jamroot.jam", """\
39exe a : dir//hello1.cpp ;
40exe b : dir//hello1.cpp/<hardcode-dll-paths>true ;
41""")
42
43t.write("dir/jamfile.jam", """\
44import common ;
45make hello1.cpp : hello.cpp : common.copy ;
46""")
47
48t.write("dir/hello.cpp", "int main() {}\n")
49
50# Show only action names.
51t.run_build_system(["-d1", "-n"])
52t.fail_test(t.stdout().count("copy") != 1)
53
54t.cleanup()