diff options
| author | Simon Glass <[email protected]> | 2021-03-07 17:35:10 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-03-12 09:57:30 -0500 |
| commit | a7a98755b888254cbc1857c567ce898a8e105e0f (patch) | |
| tree | 0edc3980d46d0e17f31661064c58b72873d2fa67 /include/test | |
| parent | 5c1cf4d2dab12a8f5b4a49dc2f06f582db69c1ef (diff) | |
test: Add a macros for finding tests in linker_lists
At present we use the linker list directly. This is not very friendly, so
add a helpful macro instead. This will also allow us to change the naming
later without updating this code.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/test')
| -rw-r--r-- | include/test/test.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h index 5eeec35f525..b16c9135f2c 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -93,6 +93,12 @@ struct unit_test { .func = _name, \ } +/* Get the start of a list of unit tests for a particular category */ +#define UNIT_TEST_SUITE_START(_suite) \ + ll_entry_start(struct unit_test, _suite) +#define UNIT_TEST_SUITE_COUNT(_suite) \ + ll_entry_count(struct unit_test, _suite) + /* Sizes for devres tests */ enum { TEST_DEVRES_SIZE = 100, |
