test: Keep track of suite duration
Show the time taken by each test suite with 'ut all' and the total time
for all suites.
Take care to remove any sandbox time-offset from the values.
Fix the comment-format on timer_test_add_offset() while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/Kconfig b/test/Kconfig
index 558a9cd..1c8e3d1 100644
--- a/test/Kconfig
+++ b/test/Kconfig
@@ -20,6 +20,15 @@
of-platdata and SPL handover. To run these tests with the sandbox_spl
board, use the -u (unit test) option.
+config UNIT_TEST_DURATION
+ bool "Report unit-test duration"
+ depends on UNIT_TEST
+ default y
+ help
+ Enable this short the time taken by each test suite. This is reported
+ after the suite runs, alongside the pass/fail results. In addition,
+ an overall total is reported if multiple suites are run.
+
config UT_LIB
bool "Unit tests for library functions"
depends on UNIT_TEST