message.py 826 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/python
  2. # Copyright (C) Vladimir Prus 2003.
  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. # Test for the regression testing framework.
  7. import BoostBuild
  8. # Create a temporary working directory.
  9. t = BoostBuild.Tester(["-d0"], use_test_config=False)
  10. t.write("Jamroot.jam", """
  11. project
  12. :
  13. : usage-requirements <define>TEST=1
  14. : default-build <link>static
  15. ;
  16. message hello : "Hello World!" ;
  17. alias hello : : <link>shared ;
  18. obj test : test.cpp hello : <link>static ;
  19. """)
  20. t.write("test.cpp", """
  21. #ifndef TEST
  22. #error TEST not defined
  23. #endif
  24. """)
  25. t.run_build_system(["test"], stdout="""Hello World!
  26. """)
  27. t.expect_addition("bin/$toolset/link-static*/test.obj")
  28. t.expect_nothing_more()
  29. t.cleanup()