summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2022-11-29 13:31:04 -0700
committerMats Wichmann <mats@linux.com>2022-11-29 13:33:07 -0700
commitd6817c0ae7670902f11ccd47f5923b9d34e8a469 (patch)
tree48d5b6738e8490b9333d9b51533198b63ba31046
parentb7d9e9543abdb8cbdfc173dbb089dd4775d8d24d (diff)
downloadscons-git-d6817c0ae7670902f11ccd47f5923b9d34e8a469.tar.gz
Fix interpreter usage in another FW test [skip appveyor]
Signed-off-by: Mats Wichmann <mats@linux.com>
-rwxr-xr-xCHANGES.txt4
-rw-r--r--testing/framework/TestCmdTests.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index d13ee27dc..7a7b3b619 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -69,6 +69,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
so maybe this helps a bit.
- Remove an extra existence check in one ninja test that caused it
to be skipped on some otherwise-valid Windows installations.
+ - test framework tests now pass on Linux and Windows (the latter can
+ still run into problems on some configurations), and automated
+ tests are now run on changes in this area so future problems can
+ be spotted.
From Andrew Morrow
diff --git a/testing/framework/TestCmdTests.py b/testing/framework/TestCmdTests.py
index 7dd2c885f..0a1fa26f9 100644
--- a/testing/framework/TestCmdTests.py
+++ b/testing/framework/TestCmdTests.py
@@ -40,6 +40,7 @@ from SCons.Util import to_bytes, to_str
sys.path = sys.path[1:]
import TestCmd
+from TestCmd import _python_
def _is_readable(path):
# XXX this doesn't take into account UID, it assumes it's our file
@@ -95,9 +96,9 @@ class TestCmdTestCase(unittest.TestCase):
textx = fmt % (t.scriptx, t.scriptx)
if sys.platform == 'win32':
textx = textx.replace('%', '%%')
- textx = f"@python -c \"{textx}\" %1 %2 %3 %4 %5 %6 %7 %8 %9\n"
+ textx = f"@{_python_} -c \"{textx}\" %1 %2 %3 %4 %5 %6 %7 %8 %9\n"
else:
- textx = f"#! /usr/bin/env python\n{textx}\n"
+ textx = f"#!{_python_}\n{textx}\n"
text1 = f"A first line to be ignored!\n{fmt % (t.script1, t.script1)}"
textout = fmtout % t.scriptout
texterr = fmterr % t.scripterr