Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/remove_requirement.py @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.8 KB
Line 
1#!/usr/bin/python
2
3#  Copyright (C) Vladimir Prus 2006.
4#  Distributed under the Boost Software License, Version 1.0. (See
5#  accompanying file LICENSE_1_0.txt or copy at
6#  http://www.boost.org/LICENSE_1_0.txt)
7
8from BoostBuild import Tester, List
9import string
10
11t = Tester()
12
13t.write("Jamroot", """
14project : requirements <threading>multi <variant>debug:<link>static ;
15
16build-project sub ;
17build-project sub2 ;
18build-project sub3 ;
19build-project sub4 ;
20""")
21
22t.write("sub/Jamfile", """
23exe hello : hello.cpp : -<threading>multi ;
24""")
25
26t.write("sub/hello.cpp", """
27int main()
28{
29    return 0;
30}
31
32""")
33
34t.write("sub2/Jamfile", """
35project : requirements -<threading>multi ;
36exe hello : hello.cpp ;
37""")
38
39t.write("sub2/hello.cpp", """
40int main()
41{
42    return 0;
43}
44
45""")
46
47t.write("sub3/hello.cpp", """
48int main()
49{
50    return 0;
51}
52
53""")
54
55t.write("sub3/Jamfile", """
56exe hello : hello.cpp : -<variant>debug:<link>static ;
57""")
58
59t.write("sub4/hello.cpp", """
60int main()
61{
62    return 0;
63}
64
65""")
66
67t.write("sub4/Jamfile", """
68project : requirements -<variant>debug:<link>static ;
69exe hello : hello.cpp ;
70""")
71
72
73
74t.run_build_system()
75
76t.expect_addition("sub/bin/$toolset/debug/link-static/hello.exe")
77t.expect_addition("sub2/bin/$toolset/debug/link-static/hello.exe")
78t.expect_addition("sub3/bin/$toolset/debug/threading-multi/hello.exe")
79t.expect_addition("sub4/bin/$toolset/debug/threading-multi/hello.exe")
80
81t.rm(".")
82
83# No test that path requirements can be removed as well.
84t.write("Jamroot", """
85build-project sub ;
86
87""")
88
89t.write("sub/Jamfile", """
90project : requirements <include>broken ;
91
92exe hello : hello.cpp : -<include>broken ;
93""")
94
95t.write("sub/hello.cpp", """
96#include "math.h"
97
98int main()
99{
100    return 0;
101}
102
103""")
104
105t.write("sub/broken/math.h", """
106Broken
107""")
108
109
110t.run_build_system()
111
112t.expect_addition("bin/$toolset/debug/hello.exe")
113
114t.cleanup()
115
Note: See TracBrowser for help on using the repository browser.