Skip to content

Commit d442454

Browse files
author
jamie
committed
Remove --suppress_timer_output. Update test rules to allow passing arguments
1 parent 6d5fdb9 commit d442454

7 files changed

Lines changed: 38 additions & 143 deletions

File tree

doc/runtime_configuration/runtime_config_reference.qbk

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ acceptable values list. All values are case sensitive and are required to exactl
164164
[Provides parameters for testing output streams.]
165165
]
166166

167-
168-
[/ ###############################################################################################]
169-
[
170-
[__param_suppress_timer_output__]
171-
[Suppress test time output.]
172-
]
173-
174167
[/ ###############################################################################################]
175168
[
176169
[__param_list_content__]
@@ -647,25 +640,6 @@ You can use this parameter to switch between these modes, by passing the paramet
647640

648641
[endsect] [/save_patterm]
649642

650-
[/ ###############################################################################################]
651-
[#ref_param_suppress_timer_output][section `suppress_timer_output`]
652-
653-
Suppresses writing of test time output.
654-
655-
Suppresses the output testing times. This is useful if you want to pattern match on test output but
656-
the test times make that difficult.
657-
658-
[h4 Acceptable values]
659-
660-
* [*no] (default)
661-
* yes
662-
663-
[h4 Environment variable]
664-
665-
BOOST_TEST_SUPPRESS_TIMER_OUTPUT
666-
667-
[endsect] [/suppress_timer_output]
668-
669643
[/ ###############################################################################################]
670644
[section:param_list_content `list_content`]
671645

include/boost/test/impl/unit_test_parameters.ipp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ std::string RESULT_CODE = "result_code";
173173
std::string TESTS_TO_RUN = "run_test";
174174
std::string SAVE_TEST_PATTERN = "save_pattern";
175175
std::string SHOW_PROGRESS = "show_progress";
176-
std::string SUPPRESS_TIMER_OUTPUT = "suppress_timer_output";
177176
std::string USE_ALT_STACK = "use_alt_stack";
178177
std::string WAIT_FOR_DEBUGGER = "wait_for_debugger";
179178

@@ -205,7 +204,6 @@ parameter_2_env_var( const_string param_name )
205204
s_mapping[TESTS_TO_RUN] = "BOOST_TESTS_TO_RUN";
206205
s_mapping[SAVE_TEST_PATTERN] = "BOOST_TEST_SAVE_PATTERN";
207206
s_mapping[SHOW_PROGRESS] = "BOOST_TEST_SHOW_PROGRESS";
208-
s_mapping[SUPPRESS_TIMER_OUTPUT] = "BOOST_TEST_SUPPRESS_TIMER_OUTPUT";
209207
s_mapping[USE_ALT_STACK] = "BOOST_TEST_USE_ALT_STACK";
210208
s_mapping[WAIT_FOR_DEBUGGER] = "BOOST_TEST_WAIT_FOR_DEBUGGER";
211209
}
@@ -332,9 +330,6 @@ init( int& argc, char** argv )
332330
<< cla::dual_name_parameter<bool>( SHOW_PROGRESS + "|p" )
333331
- (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
334332
cla::description = "Turns on progress display")
335-
<< cla::named_parameter<bool>( SUPPRESS_TIMER_OUTPUT )
336-
- (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional,
337-
cla::description = "Suppresses the display of timer output when a test completes")
338333
<< cla::dual_name_parameter<bool>( LIST_CONTENT + "|j" )
339334
- (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,cla::optional_value,
340335
cla::description = "Lists the content of test tree - names of all test suites and test cases")
@@ -517,14 +512,6 @@ deprecated_timer_format()
517512

518513
//____________________________________________________________________________//
519514

520-
bool
521-
suppress_timer_output()
522-
{
523-
return retrieve_parameter( SUPPRESS_TIMER_OUTPUT, s_cla_parser, false );
524-
}
525-
526-
//____________________________________________________________________________//
527-
528515
output_format
529516
report_format()
530517
{

include/boost/test/unit_test_parameters.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ BOOST_TEST_DECL bool save_pattern();
7474
BOOST_TEST_DECL bool show_build_info();
7575
/// Tells Unit Test Framework to show test progress (forces specific log level)
7676
BOOST_TEST_DECL bool show_progress();
77-
/// Suppress test time output
78-
BOOST_TEST_DECL bool suppress_timer_output();
7977
/// Specific test units to run/exclude
8078
BOOST_TEST_DECL std::list<std::string> const& test_to_run();
8179
/// Should execution monitor use alternative stack for signal handling

include/boost/test/utils/timer.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ inline bool has_time( const elapsed_t& elapsed )
7171
{
7272
if( runtime_config::deprecated_timer_format() )
7373
{
74-
return !runtime_config::suppress_timer_output()
75-
&& ( elapsed.user != 0 || elapsed.system != 0 );
74+
return elapsed.user != 0 || elapsed.system != 0 ;
7675
}
77-
return !runtime_config::suppress_timer_output()
78-
&& ( elapsed.wall != 0 || elapsed.user != 0 || elapsed.system != 0 );
76+
return elapsed.wall != 0 || elapsed.user != 0 || elapsed.system != 0;
7977

8078
}
8179

old_doc/html/utf/user-guide/runtime-config/reference.html

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
<li><a href="#" onclick="id339462 = select_form_page( 'utf.user-guide.runtime-config.parameters.run_test', id339462 ); return false;">run_test</a></li>
5959
<li><a href="#" onclick="id339462 = select_form_page( 'utf.user-guide.runtime-config.parameters.save_patterm', id339462 ); return false;">save_patterm</a></li>
6060
<li><a href="#" onclick="id339462 = select_form_page( 'utf.user-guide.runtime-config.parameters.show_progress', id339462 ); return false;">show_progress</a></li>
61-
<li><a href="#" onclick="id339462 = select_form_page( 'utf.user-guide.runtime-config.parameters.suppress_timer_output', id339462 ); return false;">suppress_timer_output</a></li>
6261
<li><a href="#" onclick="id339462 = select_form_page( 'utf.user-guide.runtime-config.parameters.use_alt_stack', id339462 ); return false;">use_alt_stack</a></li>
6362
</ul></td>
6463
<td class="content" valign="top">
@@ -843,43 +842,6 @@
843842
</table>
844843
<br>
845844
</div></div>
846-
<div class="entry" id="utf.user-guide.runtime-config.parameters.suppress_timer_output"><div class="segmentedlist">
847-
<table class="seglistitem">
848-
<tr class="seg">
849-
<td><strong><nobr><span class="segtitle">Parameter Name</span></nobr></strong></td>
850-
<td>: </td>
851-
<td><span class="emphasis"><em>Suppress test time output</em></span></td>
852-
</tr>
853-
<tr class="seg">
854-
<td><strong><nobr><span class="segtitle">Environment variable name</span></nobr></strong></td>
855-
<td>: </td>
856-
<td><code class="varname">BOOST_TEST_SUPPRESS_TIMER_OUTPUT</code></td>
857-
</tr>
858-
<tr class="seg">
859-
<td><strong><nobr><span class="segtitle">Command line argument name</span></nobr></strong></td>
860-
<td>: </td>
861-
<td><em class="parameter"><code>suppress_timer_output</code></em></td>
862-
</tr>
863-
<tr class="seg">
864-
<td><strong><nobr><span class="segtitle">Acceptable Values</span></nobr></strong></td>
865-
<td>: </td>
866-
<td><table border="0" summary="Simple list" class="simplelist">
867-
<tr><td><span class="bold"><strong>no</strong></span></td></tr>
868-
<tr><td>yes</td></tr>
869-
</table></td>
870-
</tr>
871-
<tr class="seg">
872-
<td><strong><nobr><span class="segtitle">Description</span></nobr></strong></td>
873-
<td>: </td>
874-
<td><p>
875-
Specifying this argument suppresses the display of test times. This can be useful
876-
if you want to pattern match on the raw test output as test times will not add
877-
any variations to different test runs.
878-
</p></td>
879-
</tr>
880-
</table>
881-
<br>
882-
</div></div>
883845
<div class="entry" id="utf.user-guide.runtime-config.parameters.use_alt_stack"><div class="segmentedlist">
884846
<table class="seglistitem">
885847
<tr class="seg">

old_doc/src/utf.user-guide.runtime-config.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -663,25 +663,6 @@ Leaving test suite "example"
663663
</descr>
664664
</refentry>
665665

666-
<refentry name="suppress_timer_format">
667-
<name>Suppress test time output</name>
668-
<env>BOOST_TEST_SUPPRESS_TIMER_OUTPUT</env>
669-
<cla>suppress_timer_output</cla>
670-
<vals>
671-
<simplelist>
672-
<member><emphasis role="bold">no</emphasis></member>
673-
<member>yes</member>
674-
</simplelist>
675-
</vals>
676-
<descr>
677-
<simpara>
678-
Specifying this argument suppresses the display of test times. This can be useful
679-
if you want to pattern match on the raw test output as test times will not add
680-
any variations to different test runs.
681-
</simpara>
682-
</descr>
683-
</refentry>
684-
685666
<refentry name="use_alt_stack">
686667
<name>Use alternative stack</name>
687668
<env>BOOST_TEST_USE_ALT_STACK</env>

test/Jamfile.v2

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,11 @@
66
# See http://www.boost.org/libs/test for the library home page.
77

88

9-
project
10-
: requirements
11-
;
12-
13-
14-
rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file * : source_files * : extra-libs ? : extra-options ? )
9+
rule test-btl-lib ( test-rule : test-name : args * : lib-name ? : pattern_file * : source_files * : extra-libs ? : extra-options ? )
1510
{
1611
source_files ?= $(test-name).cpp ;
1712
return [ $(test-rule) $(source_files) ../build//$(lib-name) $(extra-libs)
18-
: --deprecated_timer_format
13+
: $(args)
1914
: $(pattern_file)
2015
: #<stlport-iostream>on
2116
# Activating -pedantic finds more gotchas
@@ -35,11 +30,11 @@ rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file * : source
3530
] ;
3631
}
3732

38-
rule test-btl-lib-c11 ( test-rule : test-name : lib-name ? : pattern_file * : source_files * : extra-libs ? : extra-options ? )
33+
rule test-btl-lib-c11 ( test-rule : test-name : args * : lib-name ? : pattern_file * : source_files * : extra-libs ? : extra-options ? )
3934
{
4035
source_files ?= $(test-name).cpp ;
4136
return [ $(test-rule) $(source_files) ../build//$(lib-name) $(extra-libs)
42-
: --deprecated_timer_format
37+
: $(args)
4338
: $(pattern_file)
4439
: #<stlport-iostream>on
4540
# Activating -pedantic finds more gotchas
@@ -63,12 +58,12 @@ rule test-btl-lib-c11 ( test-rule : test-name : lib-name ? : pattern_file * : so
6358
] ;
6459
}
6560

66-
rule test-btl-lib-mt ( test-rule : test-name : lib-name ? : pattern_file * : source_files * : extra-libs ? )
61+
rule test-btl-lib-mt ( test-rule : test-name : args * : lib-name ? : pattern_file * : source_files * : extra-libs ? )
6762
{
6863
source_files ?= $(test-name).cpp ;
6964

7065
return [ $(test-rule) $(source_files) ../build//$(lib-name) $(extra-libs)
71-
: --deprecated_timer_format
66+
: $(args)
7267
: $(pattern_file)
7368
: #<stlport-iostream>on
7469
# Activating -pedantic finds more gotchas
@@ -93,49 +88,49 @@ rule test-btl-lib-mt ( test-rule : test-name : lib-name ? : pattern_file * : sou
9388

9489
test-suite "basics_test"
9590
:
96-
[ test-btl-lib run : class_properties_test : boost_unit_test_framework ]
97-
[ test-btl-lib run : basic_cstring_test : boost_unit_test_framework/<link>static ]
91+
[ test-btl-lib run : class_properties_test : : boost_unit_test_framework ]
92+
[ test-btl-lib run : basic_cstring_test : : boost_unit_test_framework/<link>static ]
9893
;
9994

10095
test-suite "prg_exec_monitor_test"
101-
: [ test-btl-lib run-fail : prg_exec_fail1 : included ]
102-
[ test-btl-lib run-fail : prg_exec_fail2 : boost_prg_exec_monitor/<link>static ]
103-
[ test-btl-lib run-fail : prg_exec_fail3 : boost_prg_exec_monitor/<link>static ]
104-
[ test-btl-lib run-fail : prg_exec_fail4 : boost_prg_exec_monitor/<link>static ]
96+
: [ test-btl-lib run-fail : prg_exec_fail1 : : included ]
97+
[ test-btl-lib run-fail : prg_exec_fail2 : : boost_prg_exec_monitor/<link>static ]
98+
[ test-btl-lib run-fail : prg_exec_fail3 : : boost_prg_exec_monitor/<link>static ]
99+
[ test-btl-lib run-fail : prg_exec_fail4 : : boost_prg_exec_monitor/<link>static ]
105100
;
106101

107102
test-suite "unit_test_framework_test"
108103
:
109-
[ test-btl-lib run : errors_handling_test : boost_unit_test_framework : test_files/errors_handling_test.pattern ]
110-
[ test-btl-lib run : single_header_test : : : single_header_test.cpp : /boost/timer//boost_timer/<link>static ]
104+
[ test-btl-lib run : errors_handling_test : --deprecated_timer_format : boost_unit_test_framework : test_files/errors_handling_test.pattern ]
105+
[ test-btl-lib run : single_header_test : : : : single_header_test.cpp : /boost/timer//boost_timer/<link>static ]
111106
[ test-btl-lib run-fail : minimal_test ]
112107
[ test-btl-lib run : foreach_test ]
113-
[ test-btl-lib run : output_test_stream_test : boost_unit_test_framework ]
114-
[ test-btl-lib run : result_report_test : boost_unit_test_framework : test_files/result_report_test.pattern ]
115-
[ test-btl-lib run : parameterized_test_test : boost_unit_test_framework ]
116-
[ test-btl-lib run : test_fp_comparisons : boost_unit_test_framework ]
117-
[ test-btl-lib run : test_tools_test : boost_unit_test_framework : test_files/test_tools_test.pattern ]
118-
[ test-btl-lib run : test_case_template_test : boost_unit_test_framework ]
119-
[ test-btl-lib run : custom_exception_test : boost_unit_test_framework/<link>static ]
120-
[ test-btl-lib run : fixed_mapping_test : boost_unit_test_framework ]
121-
[ test-btl-lib run : ifstream_line_iterator_test : boost_unit_test_framework : test_files/ifstream_line_iterator.tst1 test_files/ifstream_line_iterator.tst2 ]
122-
[ test-btl-lib run : algorithms_test : boost_unit_test_framework/<link>static ]
123-
[ test-btl-lib run : token_iterator_test : boost_unit_test_framework ]
124-
[ test-btl-lib run : boost_check_equal_str : boost_unit_test_framework ]
125-
[ test-btl-lib run : test_tree_management_test : boost_unit_test_framework ]
126-
[ test-btl-lib run : run_by_name_label_test : boost_unit_test_framework/<link>static ]
127-
[ test-btl-lib run : test_assertion_construction : boost_unit_test_framework/<link>static ]
128-
[ test-btl-lib run : test_datasets : boost_unit_test_framework : : [ glob test_datasets_src/*.cpp ] : ]
129-
# test-rule : test-name : lib-name ? : pattern_file * : source_files * : extra-libs ? : extra-options ?
130-
[ test-btl-lib-c11 run : test_datasets_cxx11 : boost_unit_test_framework : : [ glob test_datasets_src/*.cpp ] : ]
131-
# [ test-btl-lib run : config_file_iterator_test : boost_unit_test_framework/<link>static ]
132-
# [ test-btl-lib run : config_file_test : boost_unit_test_framework/<link>static ]
133-
[ test-btl-lib run : test_dont_print_log_value : boost_unit_test_framework ]
108+
[ test-btl-lib run : output_test_stream_test : : boost_unit_test_framework ]
109+
[ test-btl-lib run : result_report_test : : boost_unit_test_framework : test_files/result_report_test.pattern ]
110+
[ test-btl-lib run : parameterized_test_test : : boost_unit_test_framework ]
111+
[ test-btl-lib run : test_fp_comparisons : : boost_unit_test_framework ]
112+
[ test-btl-lib run : test_tools_test : : boost_unit_test_framework : test_files/test_tools_test.pattern ]
113+
[ test-btl-lib run : test_case_template_test : : boost_unit_test_framework ]
114+
[ test-btl-lib run : custom_exception_test : : boost_unit_test_framework/<link>static ]
115+
[ test-btl-lib run : fixed_mapping_test : : boost_unit_test_framework ]
116+
[ test-btl-lib run : ifstream_line_iterator_test : : boost_unit_test_framework : test_files/ifstream_line_iterator.tst1 test_files/ifstream_line_iterator.tst2 ]
117+
[ test-btl-lib run : algorithms_test : : boost_unit_test_framework/<link>static ]
118+
[ test-btl-lib run : token_iterator_test : : boost_unit_test_framework ]
119+
[ test-btl-lib run : boost_check_equal_str : : boost_unit_test_framework ]
120+
[ test-btl-lib run : test_tree_management_test : : boost_unit_test_framework ]
121+
[ test-btl-lib run : run_by_name_label_test : : boost_unit_test_framework/<link>static ]
122+
[ test-btl-lib run : test_assertion_construction : : boost_unit_test_framework/<link>static ]
123+
[ test-btl-lib run : test_datasets : : boost_unit_test_framework : : [ glob test_datasets_src/*.cpp ] : ]
124+
# test-rule : test-name : args * : lib-name ? : pattern_file * : source_files * : extra-libs ? : extra-options ?
125+
[ test-btl-lib-c11 run : test_datasets_cxx11 : : boost_unit_test_framework : : [ glob test_datasets_src/*.cpp ] : ]
126+
# [ test-btl-lib run : config_file_iterator_test : : boost_unit_test_framework/<link>static ]
127+
# [ test-btl-lib run : config_file_test : : boost_unit_test_framework/<link>static ]
128+
[ test-btl-lib run : test_dont_print_log_value : : boost_unit_test_framework ]
134129
;
135130

136131
test-suite "multithreaded_test"
137132
:
138-
[ test-btl-lib-mt run : sync_access_test : boost_unit_test_framework/<link>static : : : /boost/thread//boost_thread/<link>static ]
133+
[ test-btl-lib-mt run : sync_access_test : : boost_unit_test_framework/<link>static : : : /boost/thread//boost_thread/<link>static ]
139134
;
140135

141136
# A target that runs all the tests

0 commit comments

Comments
 (0)