aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2022-11-17 18:56:52 +0100
committerPino Toscano <pino@kde.org>2022-11-17 18:56:52 +0100
commitf5c95d3cb453ca16980db268556f23ca3cd38122 (patch)
tree085113f387c5f9608a0213e5da4ba39cdc93b373
parent821296032a16932cabe012649b4ce898de6e34eb (diff)
tests: fix clang version regexp
Instead of trying to match a lazy sequence of characters (that can be empty), pick anything until a space (including newline or a dash).
-rwxr-xr-xtests/run_tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index a7f61834..bf4967d1 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -473,7 +473,7 @@ _excluded_checks = args.exclude.split(',') if args.exclude is not None else []
# utility functions #2
version, success = get_command_output(compiler_name() + ' --version')
-match = re.search('clang version (.*?)[ -]', version)
+match = re.search('clang version ([^\s-]+)', version)
try:
version = match.group(1)
except: