https://bugs.llvm.org/show_bug.cgi?id=40702

            Bug ID: 40702
           Summary: lit on Windows crashes when launched from bash
                    implementation using Python3
           Product: Test Suite
           Version: trunk
          Hardware: PC
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: lit
          Assignee: unassignedb...@nondot.org
          Reporter: l...@ispras.ru
                CC: dan...@zuster.org, llvm-bugs@lists.llvm.org

Created attachment 21471
  --> https://bugs.llvm.org/attachment.cgi?id=21471&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to