]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/project_test3.py
3 # Copyright 2002, 2003 Dave Abrahams
4 # Copyright 2002, 2003, 2004, 2006 Vladimir Prus
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or copy at
7 # http://www.boost.org/LICENSE_1_0.txt)
12 t
= BoostBuild
.Tester(translate_suffixes
=0)
14 # First check some startup.
15 t
.set_tree("project-test3")
16 os
.remove("jamroot.jam")
17 t
.run_build_system(status
=1)
19 t
.expect_output_lines("error: Could not find parent for project at '.'\n"
20 "error: Did not find Jamfile.jam or Jamroot.jam in any parent directory.")
22 t
.set_tree("project-test3")
25 t
.expect_addition("bin/$toolset/debug*/a.obj")
26 t
.expect_content("bin/$toolset/debug*/a.obj", """\
31 t
.expect_addition("bin/$toolset/debug*/a.exe")
32 t
.expect_content("bin/$toolset/debug*/a.exe",
34 "bin/$toolset/debug*/a.obj lib/bin/$toolset/debug*/b.obj " +
35 "lib2/bin/$toolset/debug*/c.obj lib2/bin/$toolset/debug*/d.obj " +
36 "lib2/helper/bin/$toolset/debug*/e.obj " +
37 "lib3/bin/$toolset/debug*/f.obj\n"
40 t
.expect_addition("lib/bin/$toolset/debug*/b.obj")
41 t
.expect_content("lib/bin/$toolset/debug*/b.obj", """\
46 t
.expect_addition("lib/bin/$toolset/debug*/m.exe")
47 t
.expect_content("lib/bin/$toolset/debug*/m.exe", """\
49 lib/bin/$toolset/debug*/b.obj lib2/bin/$toolset/debug*/c.obj
52 t
.expect_addition("lib2/bin/$toolset/debug*/c.obj")
53 t
.expect_content("lib2/bin/$toolset/debug*/c.obj", """\
58 t
.expect_addition("lib2/bin/$toolset/debug*/d.obj")
59 t
.expect_content("lib2/bin/$toolset/debug*/d.obj", """\
64 t
.expect_addition("lib2/bin/$toolset/debug*/l.exe")
65 t
.expect_content("lib2/bin/$toolset/debug*/l.exe", """\
67 lib2/bin/$toolset/debug*/c.obj bin/$toolset/debug*/a.obj
70 t
.expect_addition("lib2/helper/bin/$toolset/debug*/e.obj")
71 t
.expect_content("lib2/helper/bin/$toolset/debug*/e.obj", """\
76 t
.expect_addition("lib3/bin/$toolset/debug*/f.obj")
77 t
.expect_content("lib3/bin/$toolset/debug*/f.obj", """\
79 lib3/f.cpp lib2/helper/bin/$toolset/debug*/e.obj
84 t
.expect_touch(["bin/$toolset/debug*/a.obj",
85 "bin/$toolset/debug*/a.exe",
86 "lib2/bin/$toolset/debug*/l.exe"])
88 t
.run_build_system(["release", "optimization=off,speed"])
89 t
.expect_addition(["bin/$toolset/release/optimization-off*/a.exe",
90 "bin/$toolset/release/optimization-off*/a.obj",
91 "bin/$toolset/release*/a.exe",
92 "bin/$toolset/release*/a.obj"])
94 t
.run_build_system(["--clean-all"])
95 t
.expect_removal(["bin/$toolset/debug*/a.obj",
96 "bin/$toolset/debug*/a.exe",
97 "lib/bin/$toolset/debug*/b.obj",
98 "lib/bin/$toolset/debug*/m.exe",
99 "lib2/bin/$toolset/debug*/c.obj",
100 "lib2/bin/$toolset/debug*/d.obj",
101 "lib2/bin/$toolset/debug*/l.exe",
102 "lib3/bin/$toolset/debug*/f.obj"])
104 # Now test target ids in command line.
105 t
.set_tree("project-test3")
106 t
.run_build_system(["lib//b.obj"])
107 t
.expect_addition("lib/bin/$toolset/debug*/b.obj")
108 t
.expect_nothing_more()
110 t
.run_build_system(["--clean", "lib//b.obj"])
111 t
.expect_removal("lib/bin/$toolset/debug*/b.obj")
112 t
.expect_nothing_more()
114 t
.run_build_system(["lib//b.obj"])
115 t
.expect_addition("lib/bin/$toolset/debug*/b.obj")
116 t
.expect_nothing_more()
118 t
.run_build_system(["release", "lib2/helper//e.obj", "/lib3//f.obj"])
119 t
.expect_addition("lib2/helper/bin/$toolset/release*/e.obj")
120 t
.expect_addition("lib3/bin/$toolset/release*/f.obj")
121 t
.expect_nothing_more()
123 # Test project ids in command line work as well.
124 t
.set_tree("project-test3")
125 t
.run_build_system(["/lib2"])
126 t
.expect_addition("lib2/bin/$toolset/debug*/" *
127 BoostBuild
.List("c.obj d.obj l.exe"))
128 t
.expect_addition("bin/$toolset/debug*/a.obj")
129 t
.expect_nothing_more()
131 t
.run_build_system(["lib"])
132 t
.expect_addition("lib/bin/$toolset/debug*/" *
133 BoostBuild
.List("b.obj m.exe"))
134 t
.expect_nothing_more()