duplicate.py 1005 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/python
  2. # Copyright 2004 Vladimir Prus
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
  5. # This test tries to stage the same file to the same location by *two* different
  6. # stage rules, in two different projects. This is not exactly good thing to do,
  7. # but still, V2 should handle this. We had two bugs:
  8. # - since the file is referred from two projects, we created to different
  9. # virtual targets
  10. # - we also failed to figure out that the two target corresponding to the copied
  11. # files (created in two projects) are actually equivalent.
  12. import BoostBuild
  13. t = BoostBuild.Tester()
  14. t.write("a.cpp", """
  15. """)
  16. t.write("jamroot.jam", """
  17. build-project a ;
  18. build-project b ;
  19. """)
  20. t.write("a/jamfile.jam", """
  21. stage bin : ../a.cpp : <location>../dist ;
  22. """)
  23. t.write("b/jamfile.jam", """
  24. stage bin : ../a.cpp : <location>../dist ;
  25. """)
  26. t.run_build_system()
  27. t.expect_addition("dist/a.cpp")
  28. t.cleanup()