tests: Output test time to trs files
authorKienan Stewart <kstewart@efficios.com>
Wed, 23 Aug 2023 18:43:54 +0000 (14:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 21 Dec 2023 21:38:35 +0000 (16:38 -0500)
commite73b293111eacc3c0f6eca0009ac3afa51ea85f1
treefdd353c86f34077d8e97a0558568da484718773e
parent9b456a42719724063ea7570991ba79aa18420440
tests: Output test time to trs files

Observed issue
==============

The test suite for lttng-tools is relatively large and can take
upwards of an hour or more to run in CI, especially with root
tests enabled.

Neither automake driver (`tests/utils/tap-driver.sh`) nor the
standalone tap script (`tests/utils/tap/tap.sh`) provide timing
information for the test runs or the steps within a test run.

Solution
========

The TAP driver invoked by `make check` has been modified to include a
`:time-taken:` metadata field (in seconds) in the produced trs file.

Known drawbacks
===============

`date` on FreeBSD does not support the `%N` formatter for nanoseconds,
which results in the precision dropping to 1s.

Metadata which isn't recognized by the automake test harness is
currently ignored, but it is a behaviour that remains open to change.

C.f. https://www.gnu.org/software/automake/manual/html_node/Log-files-generation-and-test-results-recording.html

Further work is required on the CI side to make use of the information.

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I94c7ddd7eb9388c595794e76dbbedc9bfe64d206
tests/utils/tap-driver.sh
This page took 0.024651 seconds and 4 git commands to generate.