From a6eee0b330a4fafc420b52613993e1c608e73c88 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Fri, 26 Nov 2021 16:59:16 -0700 Subject: 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 --- test/scons-time/run/config/python.py | 7 +++---- test/scons-time/run/option/python.py | 7 +++---- 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') -- cgit v0.12