Created attachment 21471
possible fix
Currently, when using Windows with a bash implementation, for example MSYS2,
test scripts are opened with the 'byte' flag to avoid Python adding \r\n line
endings. This works in Python 2.7, but in Python 3 it results in an error like
this:
Traceback (most recent call last):
File "/home/lvs/safecompiler/lit/lit/run.py", line 202, in _execute_test_impl
result = test.config.test_format.execute(test, lit_config)
File "/home/lvs/safecompiler/lit/lit/formats/shtest.py", line 25, in execute
self.execute_external)
File "/home/lvs/safecompiler/lit/lit/TestRunner.py", line 1576, in executeShTest
res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
File "/home/lvs/safecompiler/lit/lit/TestRunner.py", line 1522, in _runShTest
res = executeScript(test, litConfig, tmpBase, script, execdir)
File "/home/lvs/safecompiler/lit/lit/TestRunner.py", line 1102, in executeScript
f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')
Attached is a possible patch for this bug.
crlf.patch
(813 bytes, text/plain)