summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-11-26 23:59:16 (GMT)
committerMats Wichmann <mats@linux.com>2021-11-26 23:59:16 (GMT)
commita6eee0b330a4fafc420b52613993e1c608e73c88 (patch)
tree2a5dbaa4dea130f70d9f19ef67846c07554f4ec3
parent32f7dc39cd6720b50f92955170327a800aefb454 (diff)
downloadSCons-a6eee0b330a4fafc420b52613993e1c608e73c88.zip
SCons-a6eee0b330a4fafc420b52613993e1c608e73c88.tar.gz
SCons-a6eee0b330a4fafc420b52613993e1c608e73c88.tar.bz2
Followon test fix for PR #4067
There was another hole in the tests after updating them, which was missed locally because the local test machines took the "skip for external reasons" path, and didn't actually run the test that failed. *Any* SCons test path starts with the value of %TEMP%, which by default is "C:\Users\something\AppData\Local\Temp". If not entered as a raw string, that's a unicode escape starting with the 3rd char, and leads to a decode error. I somehow uncovovered one of those that wasn't protected as a rawstring. Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--test/scons-time/run/config/python.py7
-rw-r--r--test/scons-time/run/option/python.py7
2 files changed, 6 insertions, 8 deletions
diff --git a/test/scons-time/run/config/python.py b/test/scons-time/run/config/python.py
index d7c13a0..b880fb4 100644
--- a/test/scons-time/run/config/python.py
+++ b/test/scons-time/run/config/python.py
@@ -46,14 +46,13 @@ my_python_py = test.workpath('my_python.py')
test.write(
'config',
f"""\
-python = f'{my_python_py}'
+python = r'{my_python_py}'
""",
)
test.write(
my_python_py,
- f"""\
-#!{_python_}
+ fr"""#!{_python_}
import sys
profile = ''
for arg in sys.argv[1:]:
@@ -66,7 +65,7 @@ print('my_python.py: %s' % profile)
os.chmod(my_python_py, 0o755)
-test.run(arguments = 'run -f config foo.tar.gz')
+test.run(arguments='run -f config foo.tar.gz')
prof0 = test.workpath('foo-000-0.prof')
prof1 = test.workpath('foo-000-1.prof')
diff --git a/test/scons-time/run/option/python.py b/test/scons-time/run/option/python.py
index 5458d07..463a2a6 100644
--- a/test/scons-time/run/option/python.py
+++ b/test/scons-time/run/option/python.py
@@ -45,21 +45,20 @@ my_python_py = test.workpath('my_python.py')
test.write(
my_python_py,
- f"""\
-#!{_python_}
+ fr"""#!{_python_}
import sys
profile = ''
for arg in sys.argv[1:]:
if arg.startswith('--profile='):
profile = arg[10:]
break
-sys.stdout.write('my_python.py: %s\\n' % profile)
+print('my_python.py: %s' % profile)
""",
)
os.chmod(my_python_py, 0o755)
-test.run(arguments = 'run --python %s foo.tar.gz' % my_python_py)
+test.run(arguments='run --python %s foo.tar.gz' % my_python_py)
prof0 = test.workpath('foo-000-0.prof')
prof1 = test.workpath('foo-000-1.prof')