[Lldb-commits] [lldb] r316451 - Revert "[lldbtests] Handle errors instead of crashing."

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 24 09:35:16 PDT 2017


Actually there's fewer, I think `test/testcases` is a symlink.  But there's
more than one, for sure.  We should standardize on the one in lldbutil.py

On Tue, Oct 24, 2017 at 9:33 AM Davide Italiano <dccitaliano at gmail.com>
wrote:

> Fun fact, there are 13 implementations in tree of is_exe (and probably
> which). Maybe we should try replacing all them with the one from lit?
> Or is there some hidden dependency I'm missing?
>
> [davide at cupiditate lldb]$ grep -R 'def is_exe' *
> packages/Python/lldbsuite/test/dotest.py:def is_exe(fpath):
> packages/Python/lldbsuite/test/lldbtest.py:def is_exe(fpath):
>
> packages/Python/lldbsuite/test/benchmarks/disassembly/TestDisassembly.py:def
> is_exe(fpath):
> packages/Python/lldbsuite/test/lldbutil.py:def is_exe(fpath):
> scripts/Xcode/build-llvm.py:def is_executable(path):
> test/testcases/dotest.py:def is_exe(fpath):
> test/testcases/lldbtest.py:def is_exe(fpath):
> test/testcases/benchmarks/disassembly/TestDisassembly.py:def is_exe(fpath):
> test/testcases/lldbutil.py:def is_exe(fpath):
> utils/test/llvm-mc-shell.py:def is_exe(fpath):
> utils/test/disasm.py:def is_exe(fpath):
> utils/test/run-until-faulted.py:def is_exe(fpath):
> utils/lui/lldbutil.py:def is_exe(fpath):
> [davide at cupiditate lldb]$ grep -R 'def is_exe' * |wc -l
> 13
>
> On Tue, Oct 24, 2017 at 9:30 AM, Davide Italiano <dccitaliano at gmail.com>
> wrote:
> > On Tue, Oct 24, 2017 at 9:25 AM, Pavel Labath <labath at google.com> wrote:
> >> The breaking build is this one: <
> >>
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/14775
> >
> >>
> >> The blame email was sent (I know because I got it, as I also had a
> >> commit in the same build). Is it possible you overlooked it?
> >>
> >> ```
> >> def is_exe(fpath):
> >>    if not os.path.exists(fpath):
> >>        fpath = lit.util.which(fpath)
> >>        if not (fpath and os.path.exists(fpath)):
> >>          sys.exit(-1)
> >>       return is_exe(fpath)
> >>
> >>    return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
> >> ```
> >> ===
> >>
> >> There is a which function in dotest.py -- the thing that made the fix
> >> un-obvious is that it is implemented in terms of the is_exe function
> >> :D.
> >>
> >> So it will require a bit of refactoring to achieve this, which i did
> >> not want to do in a hurry.
> >>
> >
> > Now that I have the link I realized gmail put it to spam, go figure.
> > Anyway, thanks. I think the whole dotest.py requires a little bit of
> > love and I'll make sure to test with the same conf in the bot that
> > broke before putting up another review :)
> >
> > Thanks,
> >
> > --
> > Davide
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171024/7f06a232/attachment.html>


More information about the lldb-commits mailing list