[PATCH] D40202: Add opt-viewer testing

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 14:43:04 PST 2017


I do have the environment variable set, so I'm not sure why it's failing.
That said, I also haven't investigated, I'm letting the test fail for now
until I have time to look into it.

On Wed, Nov 29, 2017 at 2:34 PM Shoaib Meenai <smeenai at fb.com> wrote:

> Are you on Windows? Python 2.7 (and maybe early versions of 3, not sure,
> but it's definitely fixed to do things a proper way in 3.4 and above) rely
> on the NUMBER_OF_PROCESSORS environment variable to determine CPU count, so
> if you don't have this environment variable set for some reason (e.g. if
> you're running over Cygwin SSH, shudder), you'll get that error.
>
>
>
> *From: *llvm-commits <llvm-commits-bounces at lists.llvm.org> on behalf of
> Zachary Turner via llvm-commits <llvm-commits at lists.llvm.org>
> *Reply-To: *Zachary Turner <zturner at google.com>
> *Date: *Wednesday, November 29, 2017 at 4:38 PM
> *To: *Adam Nemet <anemet at apple.com>
> *Cc: *llvm-commits <llvm-commits at lists.llvm.org>, "
> reviews+D40202+public+40c851d838b3bc18 at reviews.llvm.org" <
> reviews+D40202+public+40c851d838b3bc18 at reviews.llvm.org>
> *Subject: *Re: [PATCH] D40202: Add opt-viewer testing
>
>
>
> This almost works.  I'm getting some errors about
> multiprocessing.cpu_count() being unable to determine the number of CPUs on
> my machine.  It looks like llvm has its own cpu count detection function in
> lit/lit/util.py.  I guess we should use that?  Not sure why it's broken on
> my machine.  I can fix this later since it seems to be specific to my
> machine.
>
>
>
> On Wed, Nov 29, 2017 at 9:11 AM Adam Nemet <anemet at apple.com> wrote:
>
> On Nov 28, 2017, at 5:44 PM, Adam Nemet <anemet at apple.com> wrote:
>
>
>
>
> On Nov 28, 2017, at 5:39 PM, Davide Italiano <davide at freebsd.org> wrote:
>
> On Tue, Nov 28, 2017 at 4:12 PM, Adam Nemet via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>
>
> On Nov 28, 2017, at 3:56 PM, Zachary Turner <zturner at google.com> wrote:
>
> This is failing for me on Windows.
>
> $ "C:\Python27\python.exe"
> "D:/src/llvm-mono/llvm/tools/opt-viewer/opt-viewer.py" "-s"
> "D:\src\llvm-mono\llvm\test\tools\opt-viewer/Inputs" "-o"
>
> "D:\src\llvmbuild\clang\Debug\x86\test\tools\opt-viewer\Output\basic.test.tmp"
> "D:\src\llvm-mono\llvm\test\tools\opt-viewer/Inputs/basic/or.yaml"
> "--no-highlight"
> # command stderr:
> Traceback (most recent call last):
> File "D:/src/llvm-mono/llvm/tools/opt-viewer/opt-viewer.py", line 20, in
> <module>
>   import optrecord
> File "D:\src\llvm-mono\llvm\tools\opt-viewer\optrecord.py", line 30, in
> <module>
>   p = subprocess.Popen(['c++filt', '-n'], stdin=subprocess.PIPE,
> stdout=subprocess.PIPE)
> File "C:\Python27\lib\subprocess.py", line 390, in __init__
>   errread, errwrite)
> File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
>   startupinfo)
> WindowsError: [Error 2] The system cannot find the file specified
>
> error: command failed with exit status: 1
>
> What is c++filt supposed to be, because I don't have it.
>
>
> You can probably fallback on llvm-cxxfilt, for Itanium, and leave the
> symbol unmangled on Windows.
>
>
> Yeah, I think I just add an option to override the demangler and pass in
> llvm-cxxfilt from the build when running the test.  The main problem was
> that macOS does not have llvm-cxxfilt installed.
>
>
>
> r319324 implements this.  Please let me know if this works on Windows.
>
>
>
> Thanks,
>
> Adam
>
>
>
>
>
>
>
>
> It’s the binutils demangler, I’ll fix it later.  Reverted in r319262.
> Sorry
> about the breakage.
>
>
> On Mon, Nov 27, 2017 at 11:01 AM Adam Nemet via Phabricator via
> llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>
>
> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL319073: Add opt-viewer testing (authored by anemet).
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D40202
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D40202&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ZNEuwtNRZW8u4eaFSVmMyuiiN8FGgkN3M2Tm5MavjVk&s=tUg2afM68teE08YQcwoEyAwp1kEQ9ZrdXY1PJXIWRx8&e=>
>
> Files:
> llvm/trunk/cmake/config-ix.cmake
> llvm/trunk/test/lit.cfg.py
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.cfg.py&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ZNEuwtNRZW8u4eaFSVmMyuiiN8FGgkN3M2Tm5MavjVk&s=TuI4rB-uMaSUXYCXTVKDaMd4UmbeWXS8g_IDRbwvgWg&e=>
> llvm/trunk/test/lit.site.cfg.py.in
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.py.in&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ZNEuwtNRZW8u4eaFSVmMyuiiN8FGgkN3M2Tm5MavjVk&s=mQHZ_QfhLd1SuqIT2DgXY_gklcVdky1-Z1NqC3rpE8Y&e=>
> llvm/trunk/test/tools/opt-viewer/Inputs/basic/or.c
> llvm/trunk/test/tools/opt-viewer/Inputs/basic/or.h
> llvm/trunk/test/tools/opt-viewer/Inputs/basic/or.yaml
> llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.c.html
> llvm/trunk/test/tools/opt-viewer/Outputs/basic/basic_or.h.html
> llvm/trunk/test/tools/opt-viewer/Outputs/basic/index.html
> llvm/trunk/test/tools/opt-viewer/Outputs/basic/style.css
> llvm/trunk/test/tools/opt-viewer/basic.test
> llvm/trunk/test/tools/opt-viewer/lit.local.cfg
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ZNEuwtNRZW8u4eaFSVmMyuiiN8FGgkN3M2Tm5MavjVk&s=zxkCoQu0Jo_eXcDT9-rbokeQy1L-XgeGgS089h9rQQk&e=>
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ZNEuwtNRZW8u4eaFSVmMyuiiN8FGgkN3M2Tm5MavjVk&s=zxkCoQu0Jo_eXcDT9-rbokeQy1L-XgeGgS089h9rQQk&e=>
>
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171129/51058418/attachment.html>


More information about the llvm-commits mailing list