]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/load_order.py
3 # Copyright 2004 Vladimir Prus.
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)
8 # Test that we load parent projects before loading children.
12 t
= BoostBuild
.Tester(use_test_config
=False)
14 t
.write("jamroot.jam", """\
15 use-project /child : child ;
16 ECHO "Setting parent requirements" ;
17 project : requirements <define>PASS_THE_TEST ;
18 alias x : child//main ;
21 t
.write("child/jamfile.jam", """\
22 ECHO "Setting child requirements" ;
27 t
.write("child/main.cpp", """\
28 #if defined(PASS_THE_TEST)
35 t
.expect_addition("child/bin/$toolset/debug/main.exe")
36 t
.fail_test(t
.stdout().find("Setting child requirements") < t
.stdout().find(
37 "Setting parent requirements"))
40 # Regression test: parent requirements were ignored in some cases.
42 t
.write("jamroot.jam", "build-project src ;")
43 t
.write("src/jamfile.jam", "project : requirements <define>EVERYTHING_OK ;")
44 t
.write("src/app/jamfile.jam", "exe test : test.cpp ;")
45 t
.write("src/app/test.cpp", """\
51 t
.run_build_system(subdir
="src/app")
52 t
.expect_addition("src/app/bin/$toolset/debug/test.exe")
55 # child/child2 used to be loaded before child
57 t
.write("jamroot.jam", """\
58 use-project /child/child2 : child/child2 ;
61 ECHO "Running parent-rule" ;
64 t
.write("child/jamfile.jam", "")
65 t
.write("child/child1/jamfile.jam", "")
66 t
.write("child/child2/jamfile.jam", "parent-rule ;")
68 t
.run_build_system(subdir
="child/child1")
69 t
.expect_output_lines("Running parent-rule")