[lldb-dev] test suite issue with Python2.7/3.5

Romaric Jodin via lldb-dev lldb-dev at lists.llvm.org
Tue Jul 23 07:38:20 PDT 2019


Hi everyone,

I'm trying to run the test suite on lldb and I'm having some issues with
Python. I'm on branch 7.0.

When I build lldb, I've got a folder "python3.5/site-packages" generated.
So I believe that the build system found python3 in my environment.
But when I run the testsuite (using "ninja check-lldb"), I've got this
issue:

Traceback (most recent call last):
  File
"/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/decorators.py",
line 113, in wrapper
    func(*args, **kwargs)
  File
"/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/decorators.py",
line 341, in wrapper
    return func(self, *args, **kwargs)
  File
"/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/functionalities/command_regex/TestCommandRegex.py",
line 39, in test_command_regex
    child.expect_exact(prompt)
  File
"/home/rjodin/work/dpu_tools/llvm/lldb/lldb/third_party/Python/module/pexpect-2.4/pexpect.py",
line 1386, in expect_exact
    if type(pattern_list) in types.StringTypes or pattern_list in (
AttributeError: module 'types' has no attribute 'StringTypes'

It seems that it's because the code in "pexpect.py" is not compatible with
python3.5.
If I force the system to use python2.7, I've got another issue because of
the way "_lldb.so" is built (with python3.5):

Traceback (most recent call last):
  File "/home/rjodin/work/dpu_tools/llvm/lldb/lldb/test/dotest.py", line 7,
in <module>
    lldbsuite.test.run_suite()
  File
"/home/rjodin/work/dpu_tools/llvm/lldb/lldb/packages/Python/lldbsuite/test/dotest.py",
line 1180, in run_suite
    import lldb
  File
"/home/rjodin/package-sdk-2019.3.0/upmem-internal/usr/share/upmem/lib/python3.5/site-packages/lldb/__init__.py",
line 39, in <module>
    import _lldb
ImportError: dynamic module does not define init function (init_lldb)


What do I do wrong?
Thanks,
-- 
*Romaric JODIN*
UPMEM
*Software Engineer*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190723/e511438f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo signature mail 50x50.png
Type: image/png
Size: 1939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190723/e511438f/attachment.png>


More information about the lldb-dev mailing list