Skip to content

Commit

Permalink
Add more documentation for <Project>_SHOW_TEST_START_END_DATE_TIME
Browse files Browse the repository at this point in the history
This is a super useful option when you want to know about timing of tests.
  • Loading branch information
bartlettroscoe committed Feb 19, 2019
1 parent f5ca5b7 commit 64a7ba1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
15 changes: 15 additions & 0 deletions tribits/doc/build_ref/TribitsBuildReferenceBody.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,21 @@ did not get added, then this line will show why the test was not added
``CATEGORIES``, ``HOST``, ``XHOST``, ``HOSTTYPE``, or ``XHOSTTYPE``
arguments).


Enable advanced test start and end times and timing blocks
----------------------------------------------------------

For tests added using ``TRIBITS_ADD_ADVANCED_TEST()``, one can see start and
end times for the tests and the timing for each ``TEST_<IDX>`` block in the
detailed test output by configuring with::

-D<Project>_SHOW_TEST_START_END_DATE_TIME=ON

The implementation of this feature currently uses ``EXECUTE_PROCESS(date)``
and therefore will only work on many (but perhaps not all) Linux/Unix/Mac
systems and not native Windows systems.


.. _DART_TESTING_TIMEOUT:

Setting test timeouts at configure time
Expand Down
11 changes: 6 additions & 5 deletions tribits/doc/developers_guide/TribitsDevelopersGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8499,15 +8499,16 @@ These options are described below.

The cache variable ``${PROJECT_NAME}_SHOW_TEST_START_END_DATE_TIME``
determines if the start and end date/time for each advanced test (i.e. added
with `TRIBITS_ADD_ADVANCED_TEST()`_) is printed or not with each test. The
TriBITS default is ``OFF`` but a TriBITS project can change this default by
setting::
with `TRIBITS_ADD_ADVANCED_TEST()`_) is printed or not with each test. If
set to ``TRUE`` this also causes in the timing for each ``TEST_<IDX>`` block
to be printed as well. The TriBITS default is ``OFF`` but a TriBITS project
can change this default by setting::

SET(${PROJECT_NAME}_SHOW_TEST_START_END_DATE_TIME_DEFAULT ON)

The implementation of this feature currently uses ``EXECUTE_PROCESS(date)``
and therefore will only work on Linux/Unix/Mac systems and not Windows
systems.
and therefore will only work on many (but perhaps not all) Linux/Unix/Mac
systems and not Windows systems.

NOTE: In a future version of CTest, this option may turn on start and end
date/time for regular tests added with `TRIBITS_ADD_TEST()`_ (which uses a
Expand Down

0 comments on commit 64a7ba1

Please sign in to comment.