]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/python |
2 | ||
3 | # Copyright 2002, 2003, 2004 Vladimir Prus | |
4 | # Distributed under the Boost Software License, Version 1.0. | |
1e59de90 | 5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) |
7c673cae FG |
6 | |
7 | # Test that we can use already built sources | |
8 | ||
9 | import BoostBuild | |
10 | ||
11 | t = BoostBuild.Tester(["debug", "release"], use_test_config=False) | |
12 | ||
13 | t.set_tree('prebuilt') | |
14 | ||
15 | t.expand_toolset("ext/jamroot.jam") | |
16 | t.expand_toolset("jamroot.jam") | |
17 | ||
18 | # First, build the external project. | |
19 | t.run_build_system(subdir="ext") | |
20 | ||
21 | # Then pretend that we do not have the sources for the external project, and | |
22 | # can only use compiled binaries. | |
23 | t.copy("ext/jamfile2.jam", "ext/jamfile.jam") | |
24 | t.expand_toolset("ext/jamfile.jam") | |
25 | ||
26 | # Now check that we can build the main project, and that correct prebuilt file | |
27 | # is picked, depending of variant. This also checks that correct includes for | |
28 | # prebuilt libraries are used. | |
29 | t.run_build_system() | |
b32b8144 FG |
30 | t.expect_addition("bin/$toolset/debug*/hello.exe") |
31 | t.expect_addition("bin/$toolset/release*/hello.exe") | |
7c673cae FG |
32 | |
33 | t.rm("bin") | |
34 | ||
35 | ||
36 | # Now test that prebuilt file specified by absolute name works too. | |
37 | t.copy("ext/jamfile3.jam", "ext/jamfile.jam") | |
38 | t.expand_toolset("ext/jamfile.jam") | |
39 | t.run_build_system() | |
b32b8144 FG |
40 | t.expect_addition("bin/$toolset/debug*/hello.exe") |
41 | t.expect_addition("bin/$toolset/release*/hello.exe") | |
7c673cae FG |
42 | |
43 | t.cleanup() |