<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - lit on Windows crashes when launched from bash implementation using Python3"
href="https://bugs.llvm.org/show_bug.cgi?id=40702">40702</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lit on Windows crashes when launched from bash implementation using Python3
</td>
</tr>
<tr>
<th>Product</th>
<td>Test Suite
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>lit
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lvs@ispras.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>daniel@zuster.org, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=21471" name="attach_21471" title="possible fix">attachment 21471</a> <a href="attachment.cgi?id=21471&action=edit" title="possible fix">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>