]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/test/test/Jamfile.v2
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / test / test / Jamfile.v2
1 # (C) Copyright Gennadiy Rozental 2001-2015.
2 # Use, modification, and distribution are subject to the
3 # Boost Software License, Version 1.0. (See accompanying file
4 # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #
6 # See http://www.boost.org/libs/test for the library home page.
7
8 import path ;
9
10 import ../../config/checks/config : requires ;
11
12 project
13 : requirements
14 ;
15
16 local check_msg = "Boost.Test feature check: " ;
17
18 # documentation requirements: we use new style examples in the doc and compile on compilers supporting that
19 requirements_documentation = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros cxx11_template_aliases ] ;
20
21 # requirements for BOOST_TEST feature, full extension
22 requirements_boost_test_full_support = [ requires cxx11_variadic_macros cxx11_decltype cxx11_auto_declarations ] ;
23 # requirements_boost_test_full_support += [ check-target-builds ../tools/check_boost_test_support.cpp "Boost.Test feature check: BOOST_TEST full support" : : <build>no ] ;
24
25 # requirements for dataset feature
26 requirements_datasets = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros cxx11_trailing_result_types cxx11_template_aliases ] ;
27
28
29 #_________________________________________________________________________________________________#
30
31 # lib gcov : : <name>gcov : ;
32
33 rule boost.test-self-test ( test-rule : test-suite : test-name : usage-variant ? : pattern_file * : source_files * : extra-libs ? : extra-options ? : requirements * )
34 {
35 source_files ?= $(test-suite)/$(test-name).cpp ;
36 usage-variant ?= boost_unit_test_framework/<link>static ;
37
38 return [ $(test-rule) $(source_files) ../build//$(usage-variant) $(extra-libs)
39 # gcov
40 : -- "" #args
41 : $(pattern_file)
42 : # Activating -pedantic finds more gotchas
43 # Unfortunately, this warns about the use of "long long" in gcc's own stdlib
44 # So deactivate those warnings again
45 <toolset>gcc:<cxxflags>-pedantic
46 <toolset>gcc:<cxxflags>-Wno-long-long
47 <toolset>gcc:<cxxflags>-Wno-variadic-macros
48 <toolset>clang:<cxxflags>-Wno-c99-extensions
49 <toolset>clang:<cxxflags>-Wno-variadic-macros
50 # <toolset>gcc:<cxxflags>--coverage
51 <warnings>all
52 $(extra-options)
53 $(requirements)
54 : $(test-name)
55 ] ;
56 }
57
58 #_________________________________________________________________________________________________#
59
60 rule boost.test-mt-test ( test-rule : test-suite : test-name : usage-variant ? : pattern_file * : source_files * : extra-libs ? )
61 {
62 return [ boost.test-self-test $(test-rule)
63 : $(test-suite)
64 : $(test-name)
65 : $(usage-variant)
66 : $(pattern_file)
67 : $(source_files)
68 : $(extra-libs)
69 : <threading>multi
70 ] ;
71 }
72
73 #_________________________________________________________________________________________________#
74
75 rule docs-example-as-test ( test-file )
76 {
77 test-file-name = [ path.basename $(test-file) ] ;
78 test-name-rule = [ MATCH (.+)\\.(.+)\\.cpp : $(test-file-name) ] ;
79
80
81 return [ boost.test-self-test $(test-name-rule[2])
82 : ../doc/examples
83 : doc-$(test-name-rule[1])
84 : included
85 :
86 : $(test-file)
87 :
88 :
89 : $(requirements_documentation) # requirements
90 ] ;
91 }
92
93 #_________________________________________________________________________________________________#
94
95 test-suite "utils-ts"
96 :
97 [ boost.test-self-test run : utils-ts : algorithm-test ]
98 [ boost.test-self-test run : utils-ts : basic_cstring-test ]
99 [ boost.test-self-test run : utils-ts : class_properties-test ]
100 [ boost.test-self-test run : utils-ts : foreach-test ]
101 [ boost.test-self-test run : utils-ts : named_params-test ]
102 [ boost.test-self-test run : utils-ts : runtime-param-test : : : : : : [ requires cxx11_auto_declarations cxx11_function_template_default_args cxx11_lambdas cxx11_hdr_initializer_list cxx11_template_aliases ] ]
103 [ boost.test-self-test run : utils-ts : string_cast-test ]
104 [ boost.test-self-test run : utils-ts : token_iterator-test ]
105 ;
106
107 #_________________________________________________________________________________________________#
108
109 test-suite "usage-variants-ts"
110 :
111 [ boost.test-self-test run : usage-variants-ts : single-header-test : included ]
112 [ boost.test-self-test run : usage-variants-ts : single-header-custom-init-test : included ]
113 [ boost.test-self-test run : usage-variants-ts : single-header-custom-main-test : included ]
114
115 [ boost.test-self-test run : usage-variants-ts : static-library-test ]
116 [ boost.test-self-test run : usage-variants-ts : static-library-custom-init-test ]
117
118 [ boost.test-self-test run : usage-variants-ts : shared-library-test : boost_unit_test_framework/<link>shared ]
119 [ boost.test-self-test run : usage-variants-ts : shared-library-custom-init-test : boost_unit_test_framework/<link>shared ]
120 [ boost.test-self-test run : usage-variants-ts : shared-library-custom-main-test : boost_unit_test_framework/<link>shared ]
121 ;
122
123 #_________________________________________________________________________________________________#
124
125 test-suite "framework-ts"
126 :
127 [ boost.test-self-test run : framework-ts : result-report-test : : baseline-outputs/result-report-test.pattern ]
128 [ boost.test-self-test run : framework-ts : log-formatter-test : : baseline-outputs/log-formatter-test.pattern ]
129 [ boost.test-self-test run : framework-ts : run-by-name-or-label-test ]
130 ;
131
132 #_________________________________________________________________________________________________#
133
134 test-suite "writing-test-ts"
135 :
136 [ boost.test-self-test run : writing-test-ts : assertion-construction-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx11_trailing_result_types cxx11_nullptr ] ]
137 [ boost.test-self-test run : writing-test-ts : boost_check_equal-str-test ]
138 [ boost.test-self-test run : writing-test-ts : collection-comparison-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx11_unified_initialization_syntax ] ] # required by the test content
139 [ boost.test-self-test run : writing-test-ts : dont_print_log_value-test : : : : : : $(requirements_datasets) ]
140 [ boost.test-self-test run : writing-test-ts : fp-comparisons-test : : : : : : $(requirements_boost_test_full_support) ]
141 [ boost.test-self-test run : writing-test-ts : fp-multiprecision-comparison-test : : : : : : $(requirements_boost_test_full_support) ]
142 [ boost.test-self-test run : writing-test-ts : output_test_stream-test ]
143 [ boost.test-self-test run : writing-test-ts : test_tools-test : : baseline-outputs/test_tools-test.pattern : : : : $(requirements_boost_test_full_support) ]
144 [ boost.test-self-test run : writing-test-ts : windows-headers-test ]
145 [ boost.test-self-test run : writing-test-ts : tools-under-debugger-test ]
146 [ boost.test-self-test run : writing-test-ts : tools-debuggable-test : : : : : : $(requirements_boost_test_full_support) ]
147 [ boost.test-self-test run : writing-test-ts : test-dataset-over-tuples : : : : : : $(requirements_datasets) ]
148 ;
149
150 #_________________________________________________________________________________________________#
151
152 test-suite "test-organization-ts"
153 :
154 [ boost.test-self-test run : test-organization-ts : parameterized_test-test ]
155 [ boost.test-self-test run : test-organization-ts : test_case_template-test ]
156 [ boost.test-self-test run : test-organization-ts : datasets-test : : : [ glob test-organization-ts/datasets-test/*.cpp ] : : : $(requirements_datasets) ]
157 [ boost.test-self-test run : test-organization-ts : dataset-variadic_and_move_semantic-test : : : : : : $(requirements_datasets) ]
158 [ boost.test-self-test run : test-organization-ts : test_unit-order-test ]
159 [ boost.test-self-test run : test-organization-ts : test_unit-order-shuffled-test : : : : : : $(requirements_boost_test_full_support) ]
160 [ boost.test-self-test run : test-organization-ts : test-tree-management-test ]
161 ;
162
163 #_________________________________________________________________________________________________#
164
165 test-suite "multithreading-ts"
166 :
167 [ boost.test-mt-test run : multithreading-ts : sync-access-test : : : : /boost/thread//boost_thread/<link>static ]
168 ;
169
170 #_________________________________________________________________________________________________#
171
172 test-suite "prg_exec_monitor-ts"
173 :
174 [ boost.test-self-test run-fail : prg_exec_monitor-ts : result-code-test : boost_prg_exec_monitor/<link>static ]
175 [ boost.test-self-test run-fail : prg_exec_monitor-ts : system-exception-test : boost_prg_exec_monitor/<link>static ]
176 [ boost.test-self-test run-fail : prg_exec_monitor-ts : uncatched-exception-test : included ]
177 [ boost.test-self-test run-fail : prg_exec_monitor-ts : user-fatal-exception-test : boost_prg_exec_monitor/<link>static ]
178 ;
179
180 #_________________________________________________________________________________________________#
181
182 test-suite "execution_monitor-ts"
183 :
184 [ boost.test-self-test run : execution_monitor-ts : errors-handling-test : : baseline-outputs/errors-handling-test.pattern
185 baseline-outputs/errors-handling-test.pattern2 ]
186 [ boost.test-self-test run : execution_monitor-ts : custom-exception-test ]
187 ;
188
189 #_________________________________________________________________________________________________#
190
191 import sequence ;
192
193 test-suite "doc-examples-ts"
194 :
195 [ sequence.transform docs-example-as-test : [ glob ../doc/examples/*.cpp ] ]
196 ;
197
198 #_________________________________________________________________________________________________#
199
200 # A target that runs all the tests
201 alias test
202 :
203 utils-ts
204 usage-variants-ts
205 framework-ts
206 writing-test-ts
207 test-organization-ts
208 multithreading-ts
209 prg_exec_monitor-ts
210 execution_monitor-ts
211 doc-examples-ts
212 ;
213
214 #_________________________________________________________________________________________________#
215
216 # EOF