aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-06-13 00:45:15 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-06-14 01:04:55 -0400
commitaa13c46822611f615429f3f05556fc29c7e1d505 (patch)
treed59b9645972ea0f46d00b0eb532b38140b4806cb /unittests
parentc503c757f1afa4677d98901ce3fc1e509c01aeeb (diff)
downloadmeson-aa13c46822611f615429f3f05556fc29c7e1d505.zip
meson-aa13c46822611f615429f3f05556fc29c7e1d505.tar.gz
meson-aa13c46822611f615429f3f05556fc29c7e1d505.tar.bz2
WIP: refactor loggable popen calls for consistency
Diffstat (limited to 'unittests')
-rw-r--r--unittests/baseplatformtests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py
index 489e5c4..5a88733 100644
--- a/unittests/baseplatformtests.py
+++ b/unittests/baseplatformtests.py
@@ -33,7 +33,7 @@ import mesonbuild.environment
import mesonbuild.coredata
import mesonbuild.modules.gnome
from mesonbuild.mesonlib import (
- is_cygwin, join_args, windows_proof_rmtree, python_command
+ is_cygwin, join_args, split_args, windows_proof_rmtree, python_command
)
import mesonbuild.modules.pkgconfig
@@ -343,9 +343,10 @@ class BasePlatformTests(TestCase):
Fetch a list command-lines run by meson for compiler checks.
Each command-line is returned as a list of arguments.
'''
- prefix = 'Command line:'
+ prefix = 'Command line: `'
+ suffix = '` -> 0\n'
with self._open_meson_log() as log:
- cmds = [l[len(prefix):].split() for l in log if l.startswith(prefix)]
+ cmds = [split_args(l[len(prefix):-len(suffix)]) for l in log if l.startswith(prefix)]
return cmds
def get_meson_log_sanitychecks(self):