summaryrefslogtreecommitdiff
path: root/test/py/conftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-01-20 14:25:32 -0700
committerTom Rini <trini@konsulko.com>2025-01-24 14:34:40 -0600
commit4ba3ab4901c564725c37e927e2ba29595712cd9d (patch)
treeb36263667b0fccf7b57bc5911f39e0c1181e5a5c /test/py/conftest.py
parentc16b388ea8bcee9acd17a555e66e61c72b973128 (diff)
test: Drop the _test suffix on linker lists
Most test suites have a _test suffix. This is not necessary as there is also a ut_ prefix. Drop the suffix so that (with future work) the suite name can be used as the linker-list name. Remove the suffix from the pytest regex as well, moving it to the top of the file, as it is a constant. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/conftest.py')
-rw-r--r--test/py/conftest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py
index 509d19b449d..6b7ed0586e2 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -33,6 +33,9 @@ console = None
TEST_PY_DIR = os.path.dirname(os.path.abspath(__file__))
+# Regex for test-function symbols
+RE_UT_TEST_LIST = re.compile(r'[^a-zA-Z0-9_]_u_boot_list_2_ut_(.*)_2_(.*)\s*$')
+
def mkdir_p(path):
"""Create a directory path.
@@ -336,7 +339,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_(.*)\s*$')
+
def generate_ut_subtest(metafunc, fixture_name, sym_path):
"""Provide parametrization for a ut_subtest fixture.
@@ -363,7 +366,7 @@ def generate_ut_subtest(metafunc, fixture_name, sym_path):
vals = []
for l in lines:
- m = re_ut_test_list.search(l)
+ m = RE_UT_TEST_LIST.search(l)
if not m:
continue
suite, name = m.groups()