aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/xcodebackend.py6
-rw-r--r--mesonbuild/compilers/mixins/gnu.py9
-rw-r--r--unittests/platformagnostictests.py4
3 files changed, 6 insertions, 13 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 72667d7..ad48673 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -822,7 +822,7 @@ class XCodeBackend(backends.Backend):
if isinstance(s, mesonlib.File):
s = os.path.join(s.subdir, s.fname)
elif isinstance(s, str):
- s = os.path.joni(t.subdir, s)
+ s = os.path.join(t.subdir, s)
else:
continue
custom_dict = PbxDict()
@@ -942,7 +942,7 @@ class XCodeBackend(backends.Backend):
if isinstance(s, mesonlib.File):
s = os.path.join(s.subdir, s.fname)
elif isinstance(s, str):
- s = os.path.joni(t.subdir, s)
+ s = os.path.join(t.subdir, s)
else:
continue
source_file_children.add_item(self.fileref_ids[(tname, s)], s)
@@ -975,7 +975,7 @@ class XCodeBackend(backends.Backend):
if isinstance(s, mesonlib.File):
s = os.path.join(s.subdir, s.fname)
elif isinstance(s, str):
- s = os.path.joni(t.subdir, s)
+ s = os.path.join(t.subdir, s)
else:
continue
target_children.add_item(self.fileref_ids[(tid, s)], s)
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py
index b91788c..91e07e5 100644
--- a/mesonbuild/compilers/mixins/gnu.py
+++ b/mesonbuild/compilers/mixins/gnu.py
@@ -106,14 +106,7 @@ def gnulike_default_include_dirs(compiler: T.Tuple[str, ...], lang: str) -> 'Imm
env = os.environ.copy()
env["LC_ALL"] = 'C'
cmd = list(compiler) + [f'-x{lang}', '-E', '-v', '-']
- p = subprocess.Popen(
- cmd,
- stdin=subprocess.DEVNULL,
- stderr=subprocess.STDOUT,
- stdout=subprocess.PIPE,
- env=env
- )
- stdout = p.stdout.read().decode('utf-8', errors='replace')
+ _, stdout, _ = mesonlib.Popen_safe(cmd, stderr=subprocess.STDOUT, env=env)
parse_state = 0
paths = [] # type: T.List[str]
for line in stdout.split('\n'):
diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py
index 6e0951f..f45e6b4 100644
--- a/unittests/platformagnostictests.py
+++ b/unittests/platformagnostictests.py
@@ -77,9 +77,9 @@ class PlatformAgnosticTests(BasePlatformTests):
output = self.init(testdir)
# Check if message is not printed to stdout while configuring
- assert(log_msg not in output)
+ self.assertNotIn(log_msg, output)
# Check if message is written to the meson log
mesonlog = os.path.join(self.builddir, 'meson-logs/meson-log.txt')
with open(mesonlog, mode='r', encoding='utf-8') as file:
- assert(log_msg in file.read())
+ self.assertIn(log_msg, file.read())