From 1facaadea1871c1b6962272dd21569a4aafda18c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 20 Oct 2022 18:22:48 -0600 Subject: test: Report skippped tests At present it is possible for a test to skip itself by returning -EAGAIN but this is not recorded. An existing example is in test_pre_run() with the "Console recording disabled" check. Keep a track of skipped tests and report the total at the end. Signed-off-by: Simon Glass Acked-by: Heinrich Schuchardt --- include/test/test.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/test/test.h b/include/test/test.h index 3bbd77c38b5..c1853ce471b 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -13,6 +13,7 @@ * struct unit_test_state - Entire state of test system * * @fail_count: Number of tests that failed + * @skip_count: Number of tests that were skipped * @start: Store the starting mallinfo when doing leak test * @of_live: true to use livetree if available, false to use flattree * @of_root: Record of the livetree root node (used for setting up tests) @@ -32,6 +33,7 @@ */ struct unit_test_state { int fail_count; + int skip_count; struct mallinfo start; struct device_node *of_root; bool of_live; -- cgit v1.3.1