2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 11:19:52 +01:00

Merge branch 'waf_ut_enc' into 'master'

waf_unit_test: prevent error when dumping run to script and environment contains UTF-8 chars

See merge request ita1024/waf!2220
This commit is contained in:
ita1024 2019-03-12 16:52:47 +00:00
commit bffbcec678

View File

@ -214,7 +214,7 @@ class utest(Task.Task):
'cmd': cmd
}
script_file = self.inputs[0].abspath() + '_run.py'
Utils.writef(script_file, script_code)
Utils.writef(script_file, script_code, encoding='utf-8')
os.chmod(script_file, Utils.O755)
if Logs.verbose > 1:
Logs.info('Test debug file written as %r' % script_file)