• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5import testing ;
6import path ;
7import regex ;
8
9rule test_all
10{
11    local all_rules ;
12    local file ;
13    local headers_path = [ path.make $(BOOST_ROOT)/libs/heap/include/boost/heap ] ;
14    for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
15    {
16        local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
17        # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
18        #       All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
19        local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
20        #ECHO $(rel_file) ;
21        all_rules += [ compile self_contained_header.cpp : <define>"BOOST_HEAP_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ] ;
22    }
23
24   for file in [ glob *.cpp ]
25   {
26        if [ path.basename $(file) ] != "self_contained_header.cpp"
27        {
28            all_rules += [ run $(file)
29                :  # additional args
30                :  # test-files
31                : <library>/boost/test//boost_unit_test_framework # requirements
32            ] ;
33        }
34   }
35
36    return $(all_rules) ;
37}
38
39test-suite heap : [ test_all ] : <threading>multi ;
40