mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
* new/targets.jam (basic-target.check-for-unused-sources): Don't warn when group of targets originated from one main target is empty. [SVN r18686]
24 lines
586 B
Python
24 lines
586 B
Python
#!/usr/bin/python
|
|
|
|
# Test that unused sources are at least reported.
|
|
|
|
from BoostBuild import Tester
|
|
from string import find
|
|
t = Tester()
|
|
|
|
t.set_tree("unused")
|
|
|
|
t.run_build_system()
|
|
# The second invocation should do nothing, and produce
|
|
# no warning. The previous invocation might have printed
|
|
# executed actions and other things, so it's not easy
|
|
# to check if warning was issued or not.
|
|
t.run_build_system()
|
|
t.fail_test(t.stdout() != '')
|
|
|
|
t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1")
|
|
t.fail_test(find(t.stdout(), "warning: Unused source b in main target ./a") == -1)
|
|
|
|
t.cleanup()
|
|
|