[LLVMbugs] [Bug 21417] New: llvm-lit fails to run on /test if Python >= 2.7.5

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 30 07:59:41 PDT 2014


            Bug ID: 21417
           Summary: llvm-lit fails to run on /test if Python >= 2.7.5
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: pablo.barrio at arm.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This bug has been introduced in revision r220900. See possible solution at the
end of the report.

Using Python version 2.7.5+ or higher (I checked with 2.7.5+ and 2.7.8), trying
to run llvm-lit with directory /test fails with the following error message:

llvm-lit: TestingConfig.py:108: fatal: unable to parse config file
'test/lit.cfg', traceback: Traceback (most recent call last):
  File "utils/lit/lit/TestingConfig.py", line 95, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "test/lit.cfg", line 104, in <module>
    llvm_ocaml_lib = os.path.join(getattr(config, 'llvm_lib_dir', None),
  File "/usr/lib/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

This is because in test/lit.cfg:

   llvm_ocaml_lib = os.path.join(getattr(config, 'llvm_lib_dir', None),

None is specified as default for getattr(). I could not reproduce the bug with
Python version 2.7.3. I replaced None by the empty string ('') in my boxes.
This fixed the errors for all Python versions. Another (possibly better) option
would be to error-check the output of getattr() before passing it to

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141030/73a7f339/attachment.html>

More information about the llvm-bugs mailing list