Jamfile.v2 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # (C) Copyright 2010: Tim Blechmann
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. import testing ;
  5. import path ;
  6. import regex ;
  7. rule test_all
  8. {
  9. local all_rules ;
  10. local file ;
  11. local headers_path = [ path.make $(BOOST_ROOT)/libs/heap/include/boost/heap ] ;
  12. for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
  13. {
  14. local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
  15. # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
  16. # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
  17. local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
  18. #ECHO $(rel_file) ;
  19. all_rules += [ compile self_contained_header.cpp : <define>"BOOST_HEAP_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ] ;
  20. }
  21. for file in [ glob *.cpp ]
  22. {
  23. if [ path.basename $(file) ] != "self_contained_header.cpp"
  24. {
  25. all_rules += [ run $(file)
  26. : # additional args
  27. : # test-files
  28. : <library>/boost/test//boost_unit_test_framework # requirements
  29. ] ;
  30. }
  31. }
  32. return $(all_rules) ;
  33. }
  34. test-suite heap : [ test_all ] : <threading>multi ;