Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/unused.py @ 12

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
5from BoostBuild import Tester
6from string import find
7t = Tester()
8
9t.set_tree("unused")
10
11t.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.
16t.run_build_system()
17t.fail_test(find(t.stdout(), "warning: Unused source { b.X } in main target ./a") == -1)
18
19t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1")
20t.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.
24t.write("a.cpp","""
25#ifdef FOO
26int main() {}
27#endif
28""")
29t.run_build_system("-sGENERATE_NOTHING=1")
30
31t.cleanup()
32
Note: See TracBrowser for help on using the repository browser.