]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/python |
2 | ||
3 | # Copyright (C) FILL SOMETHING HERE 2006. | |
4 | # Distributed under the Boost Software License, Version 1.0. (See | |
1e59de90 TL |
5 | # accompanying file LICENSE.txt or copy at |
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt) | |
7c673cae | 7 | |
f67539c2 | 8 | # This file is template for B2 tests. It creates a simple project that |
7c673cae FG |
9 | # builds one exe from one source, and checks that the exe is really created. |
10 | ||
11 | import BoostBuild | |
12 | ||
13 | ||
14 | # Create a temporary working directory. | |
15 | t = BoostBuild.Tester() | |
16 | ||
17 | # Create the needed files. | |
18 | t.write("jamroot.jam", """ | |
19 | exe hello : hello.cpp ; | |
20 | """) | |
21 | ||
22 | t.write("hello.cpp", """ | |
23 | int main() {} | |
24 | """ | |
25 | ||
26 | # Run the build. | |
27 | t.run_build_system() | |
28 | ||
29 | # First, create a list of three pathnames. | |
b32b8144 | 30 | file_list = BoostBuild.List("bin/$toolset/debug*/") * \ |
7c673cae FG |
31 | BoostBuild.List("hello.exe hello.obj") |
32 | # Second, assert that those files were added as result of the last build system | |
33 | # invocation. | |
34 | t.expect_addition(file_list) | |
35 | ||
36 | # Invoke the build system once again. | |
37 | t.run_build_system("clean") | |
38 | # Check if the files added previously were removed. | |
39 | t.expect_removal(file_list) | |
40 | ||
41 | # Remove temporary directories. | |
42 | t.cleanup() |