]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/wrong_project.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / wrong_project.py
1 #!/usr/bin/python
2
3 # Copyright Vladimir Prus 2005.
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
7
8 # Regression test. When Jamfile contained "using whatever ; " and the 'whatever'
9 # module declared a project, then all targets in Jamfile were considered to be
10 # declared in the project associated with 'whatever', not with the Jamfile.
11
12 import BoostBuild
13
14 t = BoostBuild.Tester(use_test_config=False)
15
16 t.write("a.cpp", "int main() {}\n")
17
18 t.write("jamroot.jam", """\
19 using some_tool ;
20 exe a : a.cpp ;
21 """)
22
23 t.write("some_tool.jam", """\
24 import project ;
25 project.initialize $(__name__) ;
26 rule init ( ) { }
27 """)
28
29 t.write("some_tool.py", """\
30 from b2.manager import get_manager
31 get_manager().projects().initialize(__name__)
32 def init():
33 pass
34 """)
35
36 t.run_build_system()
37 t.expect_addition("bin/$toolset/debug*/a.exe")
38
39 t.cleanup()