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