aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index a38b839..3dd8a32 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -44,6 +44,7 @@ from mesonbuild.mesonlib import (
MesonException, EnvironmentException, OptionKey, ExecutableSerialisation, EnvironmentVariables,
windows_proof_rm
)
+from mesonbuild.programs import ExternalProgram
from mesonbuild.compilers.mixins.clang import ClangCompiler
from mesonbuild.compilers.mixins.gnu import GnuCompiler
@@ -3371,7 +3372,7 @@ class AllPlatformTests(BasePlatformTests):
def test_summary(self):
testdir = os.path.join(self.unit_test_dir, '71 summary')
- out = self.init(testdir, extra_args=['-Denabled_opt=enabled'])
+ out = self.init(testdir, extra_args=['-Denabled_opt=enabled', f'-Dpython={sys.executable}'])
expected = textwrap.dedent(r'''
Some Subproject 2.0
@@ -3401,7 +3402,7 @@ class AllPlatformTests(BasePlatformTests):
Stuff
missing prog : NO
- existing prog : ''' + sys.executable + '''
+ existing prog : ''' + ExternalProgram('python3', [sys.executable], silent=True).path + '''
missing dep : NO
external dep : YES 1.2.3
internal dep : YES
@@ -3421,6 +3422,7 @@ class AllPlatformTests(BasePlatformTests):
libdir : lib
prefix : /usr
enabled_opt : enabled
+ python : ''' + sys.executable + '''
''')
expected_lines = expected.split('\n')[1:]
out_start = out.find(expected_lines[0])