diff options
author | Simon Glass <sjg@chromium.org> | 2021-10-24 02:26:11 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-11-29 02:51:51 +0300 |
commit | 689d0a1cb04cfc4bf9588660d03084c324bc10be (patch) | |
tree | 95edcbfcdfe7ad2142174573eb1190972037455e /test/py | |
parent | 0a92deec49eeaa19043523b1eb8a612e3e632640 (diff) | |
download | u-boot-689d0a1cb04cfc4bf9588660d03084c324bc10be.tar.xz |
test/py: Relax the naming rules for unit tests
At present the collection function used by pytest is quite strict on the
naming of the functions it detects. In particular it requires the name of
the test to be repeated in the function name.
This is not enforced anywhere else, but instead the tests are silently
omitted from the pytest run. This affects a few dozen tests.
The rule does not seem to have any particular purpose. Relax it, so that
all tests that use the UNIT_TEST() macro will run, regardless of the name
of the test function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/conftest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py index 11a3f307ea..16e445cd8e 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -226,7 +226,7 @@ def pytest_configure(config): import u_boot_console_exec_attach console = u_boot_console_exec_attach.ConsoleExecAttach(log, ubconfig) -re_ut_test_list = re.compile(r'[^a-zA-Z0-9_]_u_boot_list_2_ut_(.*)_test_2_\1_test_(.*)\s*$') +re_ut_test_list = re.compile(r'[^a-zA-Z0-9_]_u_boot_list_2_ut_(.*)_test_2_(.*)\s*$') def generate_ut_subtest(metafunc, fixture_name, sym_path): """Provide parametrization for a ut_subtest fixture. |