Jamfile.v2 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Tribool library
  2. # Copyright (C) 2002-2003 Douglas Gregor
  3. # Use, modification and distribution is subject to the Boost Software License,
  4. # Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. # http://www.boost.org/LICENSE_1_0.txt)
  6. # For more information, see http://www.boost.org/
  7. import path ;
  8. import os ;
  9. import regex ;
  10. import testing ;
  11. local self = logic ;
  12. rule test-expected-failures
  13. {
  14. local all_rules = ;
  15. local file ;
  16. local tests_path = [ path.make $(BOOST_ROOT)/libs/$(self)/test/compile-fail ] ;
  17. for file in [ path.glob-tree $(tests_path) : *.cpp ]
  18. {
  19. local rel_file = [ path.relative-to $(tests_path) $(file) ] ;
  20. local test_name = [ regex.replace [ regex.replace $(rel_file) "/" "-" ] ".cpp" "" ] ;
  21. local decl_test_name = cf-$(test_name) ;
  22. # ECHO $(rel_file) ;
  23. all_rules += [ compile-fail $(file) : : $(decl_test_name) ] ;
  24. }
  25. # ECHO All rules: $(all_rules) ;
  26. return $(all_rules) ;
  27. }
  28. rule test-header-isolation
  29. {
  30. local all_rules = ;
  31. local file ;
  32. local headers_path = [ path.make $(BOOST_ROOT)/libs/$(self)/include ] ;
  33. for file in [ path.glob-tree $(headers_path) : *.hpp ]
  34. {
  35. local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
  36. # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
  37. # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
  38. local test_name = [ regex.replace $(rel_file) "/" "-" ] ;
  39. local decl_test_name = ~hdr-decl-$(test_name) ;
  40. # ECHO $(rel_file) ;
  41. all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
  42. }
  43. # ECHO All rules: $(all_rules) ;
  44. return $(all_rules) ;
  45. }
  46. test-suite logic :
  47. [ test-expected-failures ]
  48. [ test-header-isolation ]
  49. [ run tribool_test.cpp ]
  50. [ run tribool_rename_test.cpp ]
  51. [ run tribool_io_test.cpp ]
  52. ;