[PATCH][Lit] Catch OSError exception when using Popen constructor

Dan Liew dan at su-root.co.uk
Tue Oct 21 18:17:07 PDT 2014


On 22 October 2014 01:59, Daniel Dunbar <daniel at zuster.org> wrote:
> Thanks, I've published a new lit package as 0.4.0.

Thanks. Looks likes its broken under Python3 though by your recent
change (r220354)

```
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/lit/run.py", line 166, in execute_test
    result = test.config.test_format.execute(test, self.lit_config)
  File "/usr/lib/python3.4/site-packages/lit/formats/shtest.py", line
12, in execute
    self.execute_external)
  File "/usr/lib/python3.4/site-packages/lit/TestRunner.py", line 491,
in executeShTest
    res = parseIntegratedTestScript(test, useExternalSh, extra_substitutions)
  File "/usr/lib/python3.4/site-packages/lit/TestRunner.py", line 421,
in parseIntegratedTestScript
    parseIntegratedTestScriptCommands(sourcepath):
  File "/usr/lib/python3.4/site-packages/lit/TestRunner.py", line 347,
in parseIntegratedTestScriptCommands
    if not data.endswith('\n'):
TypeError: endswith first arg must be bytes or a tuple of bytes, not str
```

Attached is a patch that seems to fix the error for me.

-- 
Dan Liew
PhD Student - Imperial College London
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_lit_python3.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141022/d954f3aa/attachment.bin>


More information about the llvm-commits mailing list