resolution.py 887 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/python
  2. # Copyright (C) Vladimir Prus 2006.
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # (See accompanying file LICENSE.txt or copy at
  5. # https://www.bfgroup.xyz/b2/LICENSE.txt)
  6. # Tests for the target id resolution process.
  7. import BoostBuild
  8. # Create a temporary working directory.
  9. t = BoostBuild.Tester(use_test_config=False)
  10. # Create the needed files
  11. t.write("jamroot.jam", """\
  12. exe hello : hello.cpp ;
  13. # This should use the 'hello' target, even if there is a 'hello' file in the
  14. # current dir.
  15. install s : hello : <location>. ;
  16. """)
  17. t.write("hello.cpp", "int main() {}\n")
  18. t.run_build_system()
  19. t.expect_addition("bin/$toolset/debug*/hello.obj")
  20. t.touch("hello.cpp")
  21. t.run_build_system(["s"])
  22. # If 'hello' in the 's' target resolved to file in the current dir, nothing
  23. # will be rebuilt.
  24. t.expect_touch("bin/$toolset/debug*/hello.obj")
  25. t.cleanup()