]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/test/test/Jamfile.v2
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / libs / test / test / Jamfile.v2
CommitLineData
7c673cae
FG
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
8import path ;
b32b8144
FG
9import project ;
10import property ;
11import property-set ;
92f5a8d4 12import regex ;
b32b8144 13import "class" : new ;
7c673cae
FG
14
15import ../../config/checks/config : requires ;
16
b32b8144 17project boost/test-tests
7c673cae
FG
18 : requirements
19 ;
20
b32b8144
FG
21import ../../predef/check/predef
22 : check require
23 : predef-check predef-require ;
24
7c673cae
FG
25local check_msg = "Boost.Test feature check: " ;
26
27# documentation requirements: we use new style examples in the doc and compile on compilers supporting that
28requirements_documentation = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros cxx11_template_aliases ] ;
29
30# requirements for BOOST_TEST feature, full extension
31requirements_boost_test_full_support = [ requires cxx11_variadic_macros cxx11_decltype cxx11_auto_declarations ] ;
32# requirements_boost_test_full_support += [ check-target-builds ../tools/check_boost_test_support.cpp "Boost.Test feature check: BOOST_TEST full support" : : <build>no ] ;
33
34# requirements for dataset feature
35requirements_datasets = [ requires cxx11_decltype cxx11_hdr_random cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_variadic_macros cxx11_trailing_result_types cxx11_template_aliases ] ;
36
92f5a8d4
TL
37# avoiding some broken compilers (seen on Travis)
38local l_gcc_c11_rvalue_full_support = [ predef-require "!BOOST_COMP_GNUC" or "BOOST_COMP_GNUC >= 5.0" ] ;
7c673cae
FG
39
40#_________________________________________________________________________________________________#
41
42# lib gcov : : <name>gcov : ;
43
44rule boost.test-self-test ( test-rule : test-suite : test-name : usage-variant ? : pattern_file * : source_files * : extra-libs ? : extra-options ? : requirements * )
45{
46 source_files ?= $(test-suite)/$(test-name).cpp ;
47 usage-variant ?= boost_unit_test_framework/<link>static ;
48
49 return [ $(test-rule) $(source_files) ../build//$(usage-variant) $(extra-libs)
50# gcov
51 : -- "" #args
52 : $(pattern_file)
53 : # Activating -pedantic finds more gotchas
54 # Unfortunately, this warns about the use of "long long" in gcc's own stdlib
55 # So deactivate those warnings again
56 <toolset>gcc:<cxxflags>-pedantic
57 <toolset>gcc:<cxxflags>-Wno-long-long
b32b8144 58 [ predef-check "BOOST_COMP_GNUC >= 4.3.0" : : <cxxflags>-Wno-variadic-macros ]
7c673cae
FG
59 <toolset>clang:<cxxflags>-Wno-c99-extensions
60 <toolset>clang:<cxxflags>-Wno-variadic-macros
92f5a8d4
TL
61 <toolset>clang:<cxxflags>-Werror=address-of-temporary
62 #<toolset>clang:<cxxflags>-Werror=bind-to-temporary-copy
63 <toolset>clang:<cxxflags>-Werror=return-stack-address
64 # <toolset>clang:<cxxflags>-Werror=dangling
7c673cae
FG
65# <toolset>gcc:<cxxflags>--coverage
66 <warnings>all
67 $(extra-options)
68 $(requirements)
69 : $(test-name)
70 ] ;
71}
72
73#_________________________________________________________________________________________________#
74
75rule boost.test-mt-test ( test-rule : test-suite : test-name : usage-variant ? : pattern_file * : source_files * : extra-libs ? )
76{
77 return [ boost.test-self-test $(test-rule)
78 : $(test-suite)
79 : $(test-name)
80 : $(usage-variant)
81 : $(pattern_file)
82 : $(source_files)
83 : $(extra-libs)
84 : <threading>multi
85 ] ;
86}
87
88#_________________________________________________________________________________________________#
89
90rule docs-example-as-test ( test-file )
91{
92 test-file-name = [ path.basename $(test-file) ] ;
93 test-name-rule = [ MATCH (.+)\\.(.+)\\.cpp : $(test-file-name) ] ;
94
95
96 return [ boost.test-self-test $(test-name-rule[2])
97 : ../doc/examples
98 : doc-$(test-name-rule[1])
99 : included
100 :
101 : $(test-file)
102 :
103 :
104 : $(requirements_documentation) # requirements
105 ] ;
106}
107
108#_________________________________________________________________________________________________#
109
110test-suite "utils-ts"
111:
112 [ boost.test-self-test run : utils-ts : algorithm-test ]
113 [ boost.test-self-test run : utils-ts : basic_cstring-test ]
114 [ boost.test-self-test run : utils-ts : class_properties-test ]
115 [ boost.test-self-test run : utils-ts : foreach-test ]
116 [ boost.test-self-test run : utils-ts : named_params-test ]
117 [ 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 ] ]
118 [ boost.test-self-test run : utils-ts : string_cast-test ]
119 [ boost.test-self-test run : utils-ts : token_iterator-test ]
120;
121
122#_________________________________________________________________________________________________#
123
124test-suite "usage-variants-ts"
125:
126 [ boost.test-self-test run : usage-variants-ts : single-header-test : included ]
127 [ boost.test-self-test run : usage-variants-ts : single-header-custom-init-test : included ]
128 [ boost.test-self-test run : usage-variants-ts : single-header-custom-main-test : included ]
129
130 [ boost.test-self-test run : usage-variants-ts : static-library-test ]
131 [ boost.test-self-test run : usage-variants-ts : static-library-custom-init-test ]
132
133 [ boost.test-self-test run : usage-variants-ts : shared-library-test : boost_unit_test_framework/<link>shared ]
134 [ boost.test-self-test run : usage-variants-ts : shared-library-custom-init-test : boost_unit_test_framework/<link>shared ]
135 [ boost.test-self-test run : usage-variants-ts : shared-library-custom-main-test : boost_unit_test_framework/<link>shared ]
92f5a8d4
TL
136
137 [ boost.test-self-test run : test-organization-ts : header-only-over-multiple-files : included : : usage-variants-ts/single-header-multiunit-1-test.cpp usage-variants-ts/single-header-multiunit-2-test.cpp ]
7c673cae
FG
138;
139
140#_________________________________________________________________________________________________#
141
142test-suite "framework-ts"
143:
11fdf7f2 144 [ boost.test-self-test run : framework-ts : result-report-test : : baseline-outputs/result-report-test.pattern baseline-outputs/result_report_test.pattern.default_behaviour ]
f67539c2 145 [ boost.test-self-test run : framework-ts : log-formatter-test : : baseline-outputs/log-formatter-context-test.pattern baseline-outputs/log-formatter-test.pattern baseline-outputs/log-formatter-test.pattern.junit ] # should be ordered alphabetically
7c673cae 146 [ boost.test-self-test run : framework-ts : run-by-name-or-label-test ]
b32b8144
FG
147 [ boost.test-self-test run : framework-ts : version-uses-module-name : included ]
148 [ boost.test-self-test run : framework-ts : test-macro-global-fixture : : baseline-outputs/global-fixtures-test.pattern ]
149 [ boost.test-self-test run : framework-ts : message-in-datatestcase-test : : baseline-outputs/messages-in-datasets-test.pattern : : : : $(requirements_datasets) ]
92f5a8d4
TL
150 [ boost.test-self-test run : framework-ts : decorators-datatestcase-test : : : : : : $(requirements_datasets) ]
151 [ compile-fail framework-ts/master-test-suite-non-copyable-test.cpp ../build//included ]
152 [ boost.test-self-test run : framework-ts : log-count-skipped-test : included : baseline-outputs/log-count-skipped-tests.pattern ]
11fdf7f2
TL
153
154 # ticket 13371: "Use-after-free with --log_sink=file"
92f5a8d4 155 # this single check is not enough as we should check for various command line options: we make extensive
11fdf7f2
TL
156 # checks in the smoke-tests (see below)
157 # [ boost.test-self-test run : framework-ts : check-streams-on-exit : included ]
7c673cae
FG
158;
159
160#_________________________________________________________________________________________________#
161
162test-suite "writing-test-ts"
163:
164 [ boost.test-self-test run : writing-test-ts : assertion-construction-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx11_trailing_result_types cxx11_nullptr ] ]
165 [ boost.test-self-test run : writing-test-ts : boost_check_equal-str-test ]
166 [ 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
167 [ boost.test-self-test run : writing-test-ts : dont_print_log_value-test : : : : : : $(requirements_datasets) ]
168 [ boost.test-self-test run : writing-test-ts : fp-comparisons-test : : : : : : $(requirements_boost_test_full_support) ]
169 [ boost.test-self-test run : writing-test-ts : fp-multiprecision-comparison-test : : : : : : $(requirements_boost_test_full_support) ]
92f5a8d4 170 [ boost.test-self-test run : writing-test-ts : fp-no-comparison-for-incomplete-types-test ]
b32b8144 171 [ boost.test-self-test run : writing-test-ts : fp-relational-operator ]
7c673cae
FG
172 [ boost.test-self-test run : writing-test-ts : output_test_stream-test ]
173 [ boost.test-self-test run : writing-test-ts : test_tools-test : : baseline-outputs/test_tools-test.pattern : : : : $(requirements_boost_test_full_support) ]
174 [ boost.test-self-test run : writing-test-ts : windows-headers-test ]
175 [ boost.test-self-test run : writing-test-ts : tools-under-debugger-test ]
176 [ boost.test-self-test run : writing-test-ts : tools-debuggable-test : : : : : : $(requirements_boost_test_full_support) ]
177 [ boost.test-self-test run : writing-test-ts : test-dataset-over-tuples : : : : : : $(requirements_datasets) ]
b32b8144
FG
178 [ boost.test-self-test run : writing-test-ts : nullptr-support-test : : : : : : [ requires cxx11_nullptr ] ]
179 [ boost.test-self-test run : writing-test-ts : user-defined-types-logging-customization-points ]
180 [ boost.test-self-test run : writing-test-ts : test-fixture-detect-setup-teardown ]
181 [ boost.test-self-test run : writing-test-ts : test-fixture-detect-setup-teardown-cpp11 : : : : : : [ requires cxx11_decltype cxx11_trailing_result_types ] ]
92f5a8d4
TL
182 [ boost.test-self-test run : writing-test-ts : test-with-precondition : : : : : : [ requires cxx11_auto_declarations cxx11_lambdas ] ]
183 [ boost.test-self-test run : writing-test-ts : test-timeout : : : : : : [ requires cxx11_hdr_thread cxx11_hdr_chrono ] ]
184 [ boost.test-self-test run-fail : writing-test-ts : test-timeout-fail : : : : : : [ requires cxx11_hdr_thread cxx11_hdr_chrono ] ]
185 [ boost.test-self-test run : writing-test-ts : test-timeout-suite : : : : : : $(requirements_datasets) [ requires cxx11_hdr_thread cxx11_hdr_chrono ] ]
186 [ boost.test-self-test run-fail : writing-test-ts : test-timeout-suite-fail : : : : : : $(requirements_datasets) [ requires cxx11_hdr_thread cxx11_hdr_chrono ] ]
7c673cae
FG
187;
188
189#_________________________________________________________________________________________________#
190
191test-suite "test-organization-ts"
192:
193 [ boost.test-self-test run : test-organization-ts : parameterized_test-test ]
194 [ boost.test-self-test run : test-organization-ts : test_case_template-test ]
11fdf7f2 195 [ boost.test-self-test run : test-organization-ts : test_case_template-with-tuples-test : : : : : : [ requires cxx11_hdr_tuple cxx11_auto_declarations cxx11_variadic_templates ] ]
92f5a8d4 196 [ boost.test-self-test run : test-organization-ts : test_case_template-with-variadic-typelist : : : : : : [ requires cxx11_hdr_tuple cxx11_auto_declarations cxx11_variadic_templates ] ]
7c673cae
FG
197 [ boost.test-self-test run : test-organization-ts : datasets-test : : : [ glob test-organization-ts/datasets-test/*.cpp ] : : : $(requirements_datasets) ]
198 [ boost.test-self-test run : test-organization-ts : dataset-variadic_and_move_semantic-test : : : : : : $(requirements_datasets) ]
199 [ boost.test-self-test run : test-organization-ts : test_unit-order-test ]
200 [ boost.test-self-test run : test-organization-ts : test_unit-order-shuffled-test : : : : : : $(requirements_boost_test_full_support) ]
11fdf7f2
TL
201 [ boost.test-self-test run : test-organization-ts : test_unit-nested-suite-dependency ]
202 [ boost.test-self-test run : test-organization-ts : test_unit-sanitize-names ]
7c673cae 203 [ boost.test-self-test run : test-organization-ts : test-tree-management-test ]
b32b8144 204 [ boost.test-self-test run : test-organization-ts : test-tree-several-suite-decl ]
11fdf7f2 205 [ boost.test-self-test run : test-organization-ts : test_unit-report-clashing-names ]
92f5a8d4
TL
206 [ boost.test-self-test run : test-organization-ts : test_unit-several-ts-same-name ]
207 # cannot pass parameters from the command line, another test developed below
208 # [ boost.test-self-test run : test-organization-ts : dataset-master-test-suite-accessible-test : : --param1=1 --param2=2 : : : : $(requirements_datasets) ]
7c673cae
FG
209;
210
211#_________________________________________________________________________________________________#
212
213test-suite "multithreading-ts"
214:
215 [ boost.test-mt-test run : multithreading-ts : sync-access-test : : : : /boost/thread//boost_thread/<link>static ]
216;
217
218#_________________________________________________________________________________________________#
219
220test-suite "prg_exec_monitor-ts"
221:
222 [ boost.test-self-test run-fail : prg_exec_monitor-ts : result-code-test : boost_prg_exec_monitor/<link>static ]
223 [ boost.test-self-test run-fail : prg_exec_monitor-ts : system-exception-test : boost_prg_exec_monitor/<link>static ]
224 [ boost.test-self-test run-fail : prg_exec_monitor-ts : uncatched-exception-test : included ]
225 [ boost.test-self-test run-fail : prg_exec_monitor-ts : user-fatal-exception-test : boost_prg_exec_monitor/<link>static ]
226;
227
228#_________________________________________________________________________________________________#
229
230test-suite "execution_monitor-ts"
231:
232 [ boost.test-self-test run : execution_monitor-ts : errors-handling-test : : baseline-outputs/errors-handling-test.pattern
233 baseline-outputs/errors-handling-test.pattern2 ]
234 [ boost.test-self-test run : execution_monitor-ts : custom-exception-test ]
92f5a8d4 235 [ boost.test-self-test run : execution_monitor-ts : boost_exception-test ]
7c673cae
FG
236;
237
238#_________________________________________________________________________________________________#
239
240import sequence ;
241
242test-suite "doc-examples-ts"
243:
244 [ sequence.transform docs-example-as-test : [ glob ../doc/examples/*.cpp ] ]
245;
246
247#_________________________________________________________________________________________________#
248
b32b8144
FG
249class bt-conditional-sink
250{
251 import property-set ;
252 import targets ;
253 import property ;
254
255 rule __init__ ( logger : log_or_report : sink_is_file : log_new_style )
256 {
257 self.logger = $(logger) ;
258 sink_is_file ?= "no" ;
259 self.sink_is_file = $(sink_is_file) ;
260 self.log_or_report = $(log_or_report) ;
261 self.log_new_style = $(log_new_style) ;
262 }
263
264 rule check ( properties * )
265 {
266 local ps = [ property-set.create $(properties) ] ;
267 local path,relative-to-build-dir = [ $(ps).target-path ] ;
268 local path = $(path,relative-to-build-dir[1]) ;
269
270 local ret ;
271 if $(self.log_new_style) = "yes" && $(self.log_or_report) = "log"
272 {
273 ret += "<testing.arg>--logger=$(self.logger)" ;
274
275 if $(self.sink_is_file) = "yes"
276 {
277 ret += ",,smoke-ts-sink-new-style.$(self.logger):" ;
278 }
279
280 ret = $(ret:J) ;
281 }
282 else
283 {
284 ret += <testing.arg>--$(self.log_or_report)_format=$(self.logger) ;
285
286 if $(self.sink_is_file) = "yes"
287 {
288 ret += <testing.arg>--$(self.log_or_report)_sink=smoke-ts-sink.$(self.logger) ;
289 }
290 }
291 #ECHO ret is $(ret) ;
292 #ECHO ret2 is $(ret:J) ;
293 return $(ret) ;
294 }
295}
296
297rule boost.test-smoke-ts-logger ( test-name-prefix : logger ? : log_or_report ? : requirements ? : log_new_style ? )
298{
299 logger ?= HRF ;
300 log_or_report ?= log ;
301 log_new_style ?= no ;
302
303 local detailed_name = all ;
304 if $(log_or_report) = report
305 {
306 detailed_name = detailed ;
307 }
308
309 requirements ?= $(requirements_datasets) ;
310
311 local bt-format-instance = [ new bt-conditional-sink $(logger) : $(log_or_report) : "no" : $(log_new_style) ] ;
312 local bt-format-sink-instance = [ new bt-conditional-sink $(logger) : $(log_or_report) : "yes" : $(log_new_style) ] ;
313
314 local conditions-format = <conditional>@$(bt-format-instance).check ;
315 local conditions-format-sink = <conditional>@$(bt-format-sink-instance).check ;
316
317 to-return =
318 [ run smoke-ts-included :
319 : : $(requirements) $(conditions-format) : $(test-name-prefix)-0-$(log_or_report)-format-$(log_new_style) ]
320 [ run smoke-ts-included : --$(log_or_report)_level=$(detailed_name)
321 : : $(requirements) $(conditions-format) : $(test-name-prefix)-1-$(log_or_report)-format-$(log_new_style)-all ]
322 [ run smoke-ts-included :
323 : : $(requirements) $(conditions-format-sink) : $(test-name-prefix)-2-$(log_or_report)-format-to-file-$(log_new_style) ]
324 [ run smoke-ts-included : --$(log_or_report)_level=$(detailed_name)
325 : : $(requirements) $(conditions-format-sink) : $(test-name-prefix)-3-$(log_or_report)-format-to-file-$(log_new_style)-all ]
326 [ run smoke-ts-included : --run_test=test1/_2
327 : : $(requirements) $(conditions-format) : $(test-name-prefix)-4-$(log_or_report)-format-$(log_new_style)-filter ]
92f5a8d4 328
11fdf7f2
TL
329 [ run check-streams-on-exit :
330 : : $(requirements) $(conditions-format) : $(test-name-prefix)-5--$(log_or_report)-format--newstyle-$(log_new_style) ]
331 [ run check-streams-on-exit :
332 : : $(requirements) $(conditions-format-sink) : $(test-name-prefix)-6--$(log_or_report)-format--newstyle-$(log_new_style)--with-sink ]
92f5a8d4
TL
333
334 ;
b32b8144
FG
335
336 return $(to-return) ;
337}
338
339exe smoke-ts-included : smoke-ts/basic-smoke-test.cpp
340 : $(requirements_datasets) ;
341
342exe smoke-ts-included-2 : smoke-ts/basic-smoke-test2.cpp ;
343
92f5a8d4
TL
344exe smoke-ts-included-3 : smoke-ts/basic-smoke-test3.cpp ;
345
346# for template test case filtering from the command line
347exe smoke-ts-included-4 : smoke-ts/basic-smoke-test4.cpp ;
348
11fdf7f2
TL
349exe check-streams-on-exit : framework-ts/check-streams-on-exit.cpp ;
350
92f5a8d4
TL
351exe dataset-master-test-suite-accessible-test : test-organization-ts/dataset-master-test-suite-accessible-test.cpp
352 : $(requirements_datasets) ;
353
b32b8144
FG
354alias "smoke-ts"
355:
356[ boost.test-smoke-ts-logger bt-st-txml : XML : log ]
357[ boost.test-smoke-ts-logger bt-st-txml : XML : log : : yes ]
358[ boost.test-smoke-ts-logger bt-st-txml : XML : report ]
359[ boost.test-smoke-ts-logger bt-st-thrf : HRF : log ]
360[ boost.test-smoke-ts-logger bt-st-thrf : HRF : log : : yes ]
361[ boost.test-smoke-ts-logger bt-st-thrf : HRF : report ]
362[ boost.test-smoke-ts-logger bt-st-tjunit : JUNIT : log ]
363[ boost.test-smoke-ts-logger bt-st-tjunit : JUNIT : log : : yes ]
364[ run smoke-ts-included-2 : <testing.arg>\"--run_test=test<*\" : : : bt-st-runtest-with-colons ]
92f5a8d4
TL
365[ run check-streams-on-exit : --list_content --report_sink=stdout : : $(requirements_datasets) : cla-check-list-content-with-report-sink ]
366[ run check-streams-on-exit : --list_content --report_sink=test.txt : : $(requirements_datasets) : cla-check-list-content-with-report-sink-2 ]
367
368# check being able to pass arguments command line arguments to the dataset generator
369[ run dataset-master-test-suite-accessible-test : -- --param1=1 --param2=2 : : $(requirements_datasets) : dataset-lazy-generator ]
370
371# several command line parameter checks
b32b8144 372[ run smoke-ts-included : --version : : $(requirements_datasets) : cla-check-print-version ]
92f5a8d4
TL
373[ run smoke-ts-included : -c true : : $(requirements_datasets) : cla-result-code-short ]
374[ run smoke-ts-included : -c false : : $(requirements_datasets) : cla-result-code-short-false ]
375[ run smoke-ts-included : --result_code=true : : $(requirements_datasets) : cla-result-code-long ]
376[ run smoke-ts-included : --result_code=false : : $(requirements_datasets) : cla-result-code-long-false ]
377[ run smoke-ts-included : --no_result_code : : $(requirements_datasets) : cla-result-code-long-false-short ]
378[ run smoke-ts-included : -x no -c --list_content=HRF : : $(requirements_datasets) : cla-mixed-long-short1 ]
379[ run smoke-ts-included : -x -c no --list_content=HRF : : $(requirements_datasets) : cla-mixed-long-short2 ]
380[ run smoke-ts-included : -x -c no --list_content=HRF -- --some-ignored : : $(requirements_datasets) : cla-mixed-long-short3 ]
381
382# those checks are mainly for consistency: we run a very simple thing, pass command line and
383# check behaviour wrt. to the command line arguments
384
385[ run-fail smoke-ts-included-3 : : : : cla-no-args-checking-fail ] # sanity check
386
387# short vs. long arguments with optional value
388[ run-fail smoke-ts-included-3 : --result_code : : : cla-ignore-result-code-long-fail-optional ]
389[ run smoke-ts-included-3 : --result_code=0 : : : cla-ignore-result-code-long-no-fail ]
390[ run-fail smoke-ts-included-3 : --no_result_code=0 : : : cla-ignore-result-code-long-fail-negated-wrong ]
391[ run smoke-ts-included-3 : --no_result_code : : : cla-ignore-result-code-long-no-fail-negated ]
392[ run-fail smoke-ts-included-3 : --result_code=1 : : : cla-ignore-result-code-long-fail ]
393[ run-fail smoke-ts-included-3 : -c : : : cla-ignore-result-code-short-fail-optional ]
394[ run smoke-ts-included-3 : -c no : : : cla-ignore-result-code-short-no-fail ]
395[ run-fail smoke-ts-included-3 : -c yes : : : cla-ignore-result-code-short-fail ]
396
397# short vs. long arguments without optional arguments
398[ run-fail smoke-ts-included-3 : --run_test : : : cla-runtest-long-fail-no-optional ]
399[ run smoke-ts-included-3 : --run_test=case2 : : : cla-runtest-long-no-fail ]
400[ run smoke-ts-included-3 : --run_test=case2 : : : cla-runtest-long-fail1 ]
401[ run-fail smoke-ts-included-3 : --run_test=case2 --run_test=some_suite : : : cla-runtest-repeated-long-fail ]
402[ run-fail smoke-ts-included-3 : --run_test=some_suite/case1 : : : cla-runtest-long-fail2 ]
403[ run-fail smoke-ts-included-3 : -t : : : cla-runtest-short-fail-no-optional ]
404[ run-fail smoke-ts-included-3 : -t some_suite : : : cla-runtest-short-fail1 ]
405[ run-fail smoke-ts-included-3 : -t some_suite/case1 : : : cla-runtest-short-fail2 ]
406[ run smoke-ts-included-3 : -t case2 : : : cla-runtest-short-no-fail ]
407
408# mixed short/long
409[ run-fail smoke-ts-included-3 : --run_test=case2 -t some_suite : : : cla-runtest-repeated-mixed-long-fail1 ]
410[ run-fail smoke-ts-included-3 : -t some_suite --run_test=case2 : : : cla-runtest-repeated-mixed-long-fail2 ]
411[ run smoke-ts-included-3 : --run_test=case2 -t some_suite -c no : : : cla-runtest-repeated-mixed-long-no-fail1 ]
412[ run smoke-ts-included-3 : -t some_suite -c no --run_test=case2 : : : cla-runtest-repeated-mixed-long-no-fail2 ]
413[ run smoke-ts-included-3 : -c no --run_test=case2 -t some_suite : : : cla-runtest-repeated-mixed-long-no-fail3 ]
414[ run-fail smoke-ts-included-3 : --result_code=1 --run_test=case2 -t some_suite : : : cla-runtest-repeated-mixed-long-fail3 ]
415[ run smoke-ts-included-3 : --result_code=0 --run_test=case2 -t some_suite : : : cla-runtest-repeated-mixed-long-fail4 ]
416
417# template test case filtering command line
418[ run-fail smoke-ts-included-4 : : : : cla-template-test-case-sanity-1 ]
419[ run-fail smoke-ts-included-4 : \"--run_test=test<my_struct<int_ float>>\" : : : cla-template-test-case-sanity-2 ]
420[ run smoke-ts-included-4 : \"--run_test=test<my_struct<int_ int>>\" : : : cla-template-test-case-sanity-3 ]
421[ run smoke-ts-included-4 : \"--run_test=test<my_struct<int_ int>>,test<my_struct<float_ float>>\" : : : cla-template-test-case-sanity-4 ]
422[ run-fail smoke-ts-included-4 : \"--run_test=test<my_struct<int_ int>>,test<my_struct<char_ float>>\" : : : cla-template-test-case-sanity-5 ]
423[ run-fail smoke-ts-included-4 : \"--run_test=some_suite/*\" : : : cla-template-test-case-sanity-6 ]
424[ run-fail smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<float_ int>>\" : : : cla-template-test-case-sanity-7 ]
425[ run-fail smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<int_ float>>\" : : : cla-template-test-case-sanity-8 ]
426[ run-fail smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<int_ float>>,test<my_struct<float_ int>>\" : : : cla-template-test-case-sanity-9 ]
427[ run smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<float_ float>>\" : : : cla-template-test-case-sanity-10 ]
428# test<my_struct<double_ double>> does not exist: error because test tree empty
429[ run-fail smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<double_ double>>\" : : : cla-template-test-case-sanity-11 ]
430# test<my_struct<double_ double>> does not exist, but this is not reported as error since there is at least one test case running
431[ run smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<float_ float>>,test<my_struct<double_ double>>\" : : : cla-template-test-case-sanity-12 ]
432[ run smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<float_ float>>,test<my_struct<char_ char>>\" : : : cla-template-test-case-sanity-13 ]
433[ run smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<float_ float>>\" \"--run_test=test<my_struct<int_ int>>\" : : : cla-template-test-case-sanity-14 ]
434[ run smoke-ts-included-4 : \"--run_test=some_suite/test<my_struct<float_ float>>,test<my_struct<char_ char>>\" \"--run_test=test<my_struct<int_ int>>\" : : : cla-template-test-case-sanity-15 ]
435;
436
437exe custom-command-line-binary-1 : ../doc/examples/runtime-configuration_1.run-fail.cpp ;
438exe custom-command-line-binary-2 : ../doc/examples/runtime-configuration_2.run-fail.cpp
439 : $(requirements_boost_test_full_support) ;
440exe custom-command-line-binary-3 : ../doc/examples/runtime-configuration_3.run-fail.cpp
441 : $(requirements_boost_test_full_support) ;
442exe custom-command-line-binary-4 : ../doc/examples/runtime-configuration_4.run-fail.cpp
443 : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) ;
444
445alias "custom-command-line-ts"
446:
447# custom command line interface tests
448[ run custom-command-line-binary-1 : -- --specific-param \"'additional value with quotes'\" : : : cla-specific-api1-test-1-1 ]
449[ run custom-command-line-binary-1 : --log_level=all --no_color -- --specific-param \"'additional value with quotes'\" : : : cla-specific-api1-test-1-2 ]
450
451[ run-fail custom-command-line-binary-2 : -- --random-string \"mock_device\" : : $(requirements_boost_test_full_support) : cla-specific-api1-test-2-0 ]
452[ run custom-command-line-binary-2 : -- --device-name \"mock_device\" : : $(requirements_boost_test_full_support) : cla-specific-api1-test-2-1 ]
453[ run custom-command-line-binary-2 : --log_level=all --no_color -- --device-name \"mock_device\" : : $(requirements_boost_test_full_support) : cla-specific-api1-test-2-2 ]
454
455[ run-fail custom-command-line-binary-3 : -- : : $(requirements_boost_test_full_support) : cla-specific-api1-test-3-0 ]
456[ run-fail custom-command-line-binary-3 : -- --create-parametrized : : $(requirements_boost_test_full_support) : cla-specific-api1-test-3-1 ]
457[ run-fail custom-command-line-binary-3 : -- --create-parametrized 3 : : $(requirements_boost_test_full_support) : cla-specific-api1-test-3-2 ]
458[ run custom-command-line-binary-3 : -- --create-parametrized 3 2 : : $(requirements_boost_test_full_support) : cla-specific-api1-test-3-3 ]
459
460[ run-fail custom-command-line-binary-4 : -- : : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) : cla-specific-api1-test-4-0 ]
461[ run-fail custom-command-line-binary-4 : -- --test-file : : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) : cla-specific-api1-test-4-1 ]
462[ run-fail custom-command-line-binary-4 : -- --test-file : ../doc/examples/runtime-configuration_4-test-fail.txt : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) : cla-specific-api1-test-4-2 ]
463[ run-fail custom-command-line-binary-4 : --log_level=all --no_color -- --test-file : ../doc/examples/runtime-configuration_4-test-fail.txt : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) : cla-specific-api1-test-4-3 ]
464[ run custom-command-line-binary-4 : -- --test-file : ../doc/examples/runtime-configuration_4-test.txt : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) : cla-specific-api1-test-4-4 ]
465[ run custom-command-line-binary-4 : --log_level=all --no_color -- --test-file : ../doc/examples/runtime-configuration_4-test.txt : $(requirements_datasets) [ requires cxx11_trailing_result_types cxx11_auto_declarations ] $(l_gcc_c11_rvalue_full_support) : cla-specific-api1-test-4-5 ]
466
b32b8144
FG
467;
468
469#_________________________________________________________________________________________________#
470
7c673cae
FG
471# A target that runs all the tests
472alias test
473:
b32b8144 474 smoke-ts
7c673cae
FG
475 utils-ts
476 usage-variants-ts
477 framework-ts
478 writing-test-ts
479 test-organization-ts
480 multithreading-ts
481 prg_exec_monitor-ts
482 execution_monitor-ts
483 doc-examples-ts
92f5a8d4 484 custom-command-line-ts
7c673cae
FG
485;
486
487#_________________________________________________________________________________________________#
488
92f5a8d4
TL
489rule test-selfcontained ( path )
490{
491 for local file in [ path.glob-tree $(path) : *.hpp ]
492 {
493 result += [ compile selfcontained.cpp : $(requirements_datasets) <define>BOOST_HEADER_TEST_NAME=$(file) : [ regex.replace [ path.relative-to $(path) $(file) ] "/" "_" ] ] ;
494 }
495
496 return $(result) ;
497}
498
499# Test for self-contained headers
500alias test_selfcontained_headers : [ test-selfcontained ../include ] ;
501
502
503#_________________________________________________________________________________________________#
504# Tests of the examples
505
506build-project ../example ;
7c673cae 507# EOF