diff options
| author | Simon Glass <[email protected]> | 2025-01-20 14:25:57 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-24 14:34:41 -0600 |
| commit | 374203bd2effc85b94863aaa3d1e30153811c44d (patch) | |
| tree | d23325ddd5581f0706ead8582af5a3122ac1cd8a /test/py | |
| parent | 81c5434f499e00a2143fa585e030af1821e3285f (diff) | |
test: Drop conditional compilation for suites
This is not needed anymore. If a test suite is not built, then it will
have no linker-list entries. So we can just check for that and know that
the suite is not present.
This allows removal of the #ifdefs and the need to keep them in sync
with the associated Makefile rules, which has actually failed, since the
help does not match what commands are actually present.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/py')
| -rw-r--r-- | test/py/tests/test_suite.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/py/tests/test_suite.py b/test/py/tests/test_suite.py index 20cdf022536..a4d7391ce5f 100644 --- a/test/py/tests/test_suite.py +++ b/test/py/tests/test_suite.py @@ -128,7 +128,7 @@ def process_ut_info(cons, output): @pytest.mark.buildconfigspec('sandbox') @pytest.mark.notbuildconfigspec('sandbox_spl') @pytest.mark.notbuildconfigspec('sandbox64') -def test_suite(u_boot_console): +def test_suite(u_boot_console, u_boot_config): """Perform various checks on the unit tests, including: - The number of suites matches that reported by the 'ut info' @@ -141,6 +141,7 @@ def test_suite(u_boot_console): """ cons = u_boot_console + buildconfig = u_boot_config.buildconfig with cons.log.section('Run all unit tests'): # ut hush hush_test_simple_dollar prints "Unknown command" on purpose. with u_boot_console.disable_check('unknown_command'): @@ -154,7 +155,13 @@ def test_suite(u_boot_console): cons.log.info(f'extra {extra}') # Make sure we got a test count for each suite - assert suites - exp_test_count.keys() == set() + assert not (suites - exp_test_count.keys()) + + # Deal with missing suites + with cons.log.section('Check missing suites'): + if 'config_cmd_seama' not in buildconfig: + cons.log.info("CMD_SEAMA not enabled: Ignoring suite 'seama'") + missing.discard('seama') # Run 'ut info' and compare with the log results with cons.log.section('Check suite test-counts'): |
