summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-07 17:35:12 -0700
committerTom Rini <trini@konsulko.com>2021-03-12 09:57:31 -0500
commit8482356f48c96eb49f1bd9efd53c887d09a1cf64 (patch)
tree901aeec297da03af8910e0790edf48d060d4807d /include
parent2a2814d5f2714a7b0aef9ea7f9d8d67a34875d55 (diff)
test: Allow SPL to run any available test
At present SPL only runs driver model tests. Update it to run all available tests, i.e. in any test suite. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/test/test.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/test/test.h b/include/test/test.h
index 3330dcc72d..0b124edd60 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -99,6 +99,11 @@ struct unit_test {
#define UNIT_TEST_SUITE_COUNT(_suite) \
ll_entry_count(struct unit_test, ut_ ## _suite)
+/* Use ! and ~ so that all tests will be sorted between these two values */
+#define UNIT_TEST_ALL_START() ll_entry_start(struct unit_test, ut_!)
+#define UNIT_TEST_ALL_END() ll_entry_start(struct unit_test, ut_~)
+#define UNIT_TEST_ALL_COUNT() (UNIT_TEST_ALL_END() - UNIT_TEST_ALL_START())
+
/* Sizes for devres tests */
enum {
TEST_DEVRES_SIZE = 100,
@@ -119,15 +124,4 @@ enum {
*/
struct udevice *testbus_get_clear_removed(void);
-/**
- * dm_test_run() - Run driver model tests
- *
- * Run all the available driver model tests, or a selection
- *
- * @test_name: Name of single test to run (e.g. "dm_test_fdt_pre_reloc" or just
- * "fdt_pre_reloc"), or NULL to run all
- * @return 0 if all tests passed, 1 if not
- */
-int dm_test_run(const char *test_name);
-
#endif /* __TEST_TEST_H */