[PATCH v2 1/1] buildtools: clear out regex syntax warnings
Ariel Otilibili
otilibil at eurecom.fr
Fri Dec 13 15:40:58 CET 2024
* invalid escape sequences now generate SyntaxWarning
* therefore changed syntax to raw string noration.
Link: https://docs.python.org/3/library/re.html#module-re
Fixes: 0aeaf75df87 ("test: define unit tests suites based on test types")
Fixes: 25065ef1f6c ("test: emit warning for orphaned tests")
Cc: stable at dpdk.org
Signed-off-by: Ariel Otilibili <otilibil at eurecom.fr>
---
buildtools/get-test-suites.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py
index c61f6a273f..fd22d25f36 100644
--- a/buildtools/get-test-suites.py
+++ b/buildtools/get-test-suites.py
@@ -6,10 +6,10 @@
import re
input_list = sys.argv[1:]
-test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_def_regex = re.compile(r"REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
test_suites = {}
# track tests not in any test suite.
-non_suite_regex = re.compile("REGISTER_TEST_COMMAND\s*\(\s*([a-z0-9_]+)")
+non_suite_regex = re.compile(r"REGISTER_TEST_COMMAND\s*\(\s*([a-z0-9_]+)")
non_suite_tests = []
def get_fast_test_params(test_name, ln):
--
2.47.1
More information about the stable
mailing list