forked from OERV-BSP/u-boot
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 <sjg@chromium.org>
This commit is contained in:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user