summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-02-07 11:30:35 -0700
committerTom Rini <[email protected]>2025-02-11 20:10:58 -0600
commit5f6a59e03eff0f29295ce12b3807cbac7334e0aa (patch)
treeea15fe355f0ff7c4f941da2166d0010344adb6e1 /include/test
parent5c47e432fdf1e545acccbb60f89ff4e97793fe05 (diff)
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 <[email protected]>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/test.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h
index bac43c81d63..25c7712d160 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -16,11 +16,15 @@
* @skip_count: Number of tests that were skipped
* @test_count: Number of tests run. If a test is run muiltiple times, only one
* is counted
+ * @start: Timer value when test started
+ * @duration_ms: Suite duration in milliseconds
*/
struct ut_stats {
int fail_count;
int skip_count;
int test_count;
+ ulong start;
+ ulong duration_ms;
};
/*