2 / Copyright (c) 2015 Raffi Enficiaud
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 [section:timeout Time-out for test cases]
11 The __UTF__ provides the decorator __decorator_timeout__ that specifies a time-out for a specific *test unit*.
12 The argument time is always expressed in *seconds ans wall-clock* time.
14 For test-cases, the time-out value sets the maximum allowed duration for the test. If this time is
15 exceeded, the test case is reported as failed. On some systems, the __UTF__ is able to force the test-case
16 to stop through a `SIGALRM` signal (see below).
18 For test-suites, the time-out value sets the maximum allowed duration for the entire suite to complete. This duration
19 is the accumulated time of all the test-cases contained in the sub-tree rooted on the test-suite, plus some extra
20 execution time needed by the __UTF__. For each test-units under a test-suite with time-out, the maximum allowed duration
21 is set as being the test-suite time out minus the accumulated execution time before the execution of the test-unit.
22 If this test-unit is a test-case, it is equivalent to setting the decorator __decorator_timeout__ to the test-case
23 with a time-out value expressed as before.
25 In case the test-suite times out, the
26 suite is flagged as `timed-out` and `failed`, and all the test units (suites and cases) that have not been executed
27 up to the time-out point are all skipped.
29 [bt_example decorator_11..decorator timeout..run-fail]
32 `BOOST_SIGACTION_BASED_SIGNAL_HANDLING` is defined
33 if Boost.Test is able to force the test-case to stop. This feature is for instance not supported on Windows.
34 The __UTF__ will still be able to report the test-case as failed (once the test-case finishes).]
36 [note The support of test suite level time-out has been added in [link ref_CHANGE_LOG_3_10 Boost 1.70 / __UTF__ v3.10] ]