1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright 2002 Vladimir Prus |
---|
4 | # Distributed under the Boost Software License, Version 1.0. |
---|
5 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
---|
6 | |
---|
7 | # Tests that we can use objects from other projects |
---|
8 | # (i.e. with other project root) |
---|
9 | # Test also that we can refer to those target using project-id. |
---|
10 | |
---|
11 | from BoostBuild import Tester, List |
---|
12 | |
---|
13 | t = Tester() |
---|
14 | t.set_tree("test1") |
---|
15 | |
---|
16 | t.run_build_system("-sTOOLSET=yfc", subdir="p1") |
---|
17 | |
---|
18 | t.expect_addition("p1/bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj") |
---|
19 | t.expect_addition("p1/auxillary/bin/b.obj/yfc/debug/runtime-link-dynamic/optimization-space/b.obj") |
---|
20 | t.expect_addition("p2/bin/c.obj/yfc/debug/runtime-link-dynamic/c.obj") |
---|
21 | t.expect_addition("bin/a/yfc/debug/runtime-link-dynamic/a") |
---|
22 | t.expect_nothing_more() |
---|
23 | |
---|
24 | t.fail(t.read("p1/bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj") !=\ |
---|
25 | """ |
---|
26 | <optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
27 | a.cpp |
---|
28 | """) |
---|
29 | |
---|
30 | t.fail(t.read("p1/auxillary/bin/b.obj/yfc/debug/runtime-link-dynamic/b.obj") !=\ |
---|
31 | """ |
---|
32 | <optimization>space <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
33 | b.cpp |
---|
34 | """) |
---|
35 | |
---|
36 | t.fail(t.read("p2/bin/c.obj/yfc/debug/runtime-link-dynamic/c.obj") !=\ |
---|
37 | """ |
---|
38 | <include>everything <optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
39 | a.cpp |
---|
40 | """) |
---|
41 | |
---|
42 | |
---|
43 | t.fail(t.read("bin/a/yfc/debug/runtime-link-dynamic/a") !=\ |
---|
44 | """ |
---|
45 | <optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
46 | <optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
47 | a.cpp |
---|
48 | <optimization>space <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
49 | b.cpp |
---|
50 | <include>everything <optimization>space <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug |
---|
51 | c.cpp |
---|
52 | """) |
---|
53 | |
---|
54 | t.expect_nothing_more() |
---|
55 | |
---|
56 | # TODO: need to write test cases for referring to targets using project-id. |
---|
57 | |
---|
58 | |
---|
59 | |
---|
60 | t.pass_test() |
---|
61 | |
---|