2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00
Files
build/test/unused.py
Vladimir Prus e30fb819a4 Improve the way unused sources are detected/reported.
* new/targets.jam
  (basic-target.generate-source): Separate virtual targets that come from
    different sources.
  (basic-target.check-for-unused-targets): Warn only if not virtual target
    from a given source is comsumed.


[SVN r18403]
2003-05-15 15:52:26 +00:00

22 lines
448 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.
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()