Last change
on this file since 12 was
12,
checked in by landauf, 18 years ago
|
added boost
|
-
Property svn:executable set to
*
|
File size:
869 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Test that unused sources are at least reported. |
---|
4 | |
---|
5 | from BoostBuild import Tester |
---|
6 | from string import find |
---|
7 | t = Tester() |
---|
8 | |
---|
9 | t.set_tree("unused") |
---|
10 | |
---|
11 | t.run_build_system() |
---|
12 | # The second invocation should do nothing, and produce |
---|
13 | # no warning. The previous invocation might have printed |
---|
14 | # executed actions and other things, so it's not easy |
---|
15 | # to check if warning was issued or not. |
---|
16 | t.run_build_system() |
---|
17 | t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1) |
---|
18 | |
---|
19 | t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1") |
---|
20 | t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1) |
---|
21 | |
---|
22 | # Now check that even if main target generates nothing, its |
---|
23 | # usage requirements are still propagated to dependents. |
---|
24 | t.write("a.cpp",""" |
---|
25 | #ifdef FOO |
---|
26 | int main() {} |
---|
27 | #endif |
---|
28 | """) |
---|
29 | t.run_build_system("-sGENERATE_NOTHING=1") |
---|
30 | |
---|
31 | t.cleanup() |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.