Jamfile.v2 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Boost.Assign library
  2. #
  3. # Copyright Thorsten Ottosen 2003-2005. Use, modification and
  4. # distribution is subject to the Boost Software License, Version
  5. # 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. # http://www.boost.org/LICENSE_1_0.txt)
  7. #
  8. # For more information, see http://www.boost.org/libs/assign/
  9. #
  10. import path ;
  11. import regex ;
  12. rule assign-test ( name )
  13. {
  14. return [
  15. run $(name).cpp /boost/test//boost_unit_test_framework/<link>static ]
  16. ;
  17. }
  18. # this rule enumerates through all the headers and ensures
  19. # that inclusion of the header by itself is sufficient to
  20. # compile successfully, proving the header does not depend
  21. # on any other headers to be included first - adapted from
  22. # logic in the winapi test bjam script
  23. rule test_headers
  24. {
  25. local all_rules = ;
  26. local file ;
  27. local headers_path = [ path.make $(BOOST_ROOT)/libs/assign/include/boost/assign ] ;
  28. for file in [ path.glob-tree $(headers_path) : *.hpp : assign ]
  29. {
  30. local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
  31. # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
  32. # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
  33. local test_name = [ regex.replace $(rel_file) "/" "-" ] ;
  34. local decl_test_name = ~hdr-decl-$(test_name) ;
  35. # ECHO $(rel_file) ;
  36. all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_ASSIGN_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
  37. }
  38. local tests_path = [ path.make $(BOOST_ROOT)/libs/assign/test/compile-fail ] ;
  39. for file in [ path.glob-tree $(tests_path) : *.cpp ]
  40. {
  41. local rel_file = [ path.relative-to $(tests_path) $(file) ] ;
  42. local test_name = [ regex.replace [ regex.replace $(rel_file) "/" "-" ] ".cpp" "" ] ;
  43. local decl_test_name = cf-$(test_name) ;
  44. # ECHO $(rel_file) ;
  45. all_rules += [ compile-fail $(file) : : $(decl_test_name) ] ;
  46. }
  47. # ECHO All rules: $(all_rules) ;
  48. return $(all_rules) ;
  49. }
  50. test-suite assign :
  51. [ test_headers ]
  52. [ assign-test basic ]
  53. [ assign-test std ]
  54. [ assign-test array ]
  55. [ assign-test list_of ]
  56. [ assign-test ptr_list_of ]
  57. [ assign-test static_list_of ]
  58. [ assign-test tuple_list_of ]
  59. [ assign-test list_inserter ]
  60. [ assign-test ptr_list_inserter ]
  61. [ assign-test ptr_map_inserter ]
  62. [ assign-test list_of_workaround ]
  63. [ assign-test email_example ]
  64. [ assign-test my_vector_example ]
  65. [ assign-test multi_index_container ]
  66. ;