Zachary Turner via llvm-dev
2017-Sep-22 18:31 UTC
[llvm-dev] No longer able to run lit tests within a sub-tool
This works for me. Can you run "which clang-func-mapping" and also add a line to clang/test/lit.cfg.py to print the value of config.environment['PATH']? On Fri, Sep 22, 2017 at 11:27 AM Zachary Turner <zturner at google.com> wrote:> Looking, thanks for the report. > > On Fri, Sep 22, 2017 at 11:22 AM Vedant Kumar <vsk at apple.com> wrote: > >> As of r313998, this workflow no longer works: >> >> cd <build-dir> >> ./bin/llvm-lit <src>/llvm/tools/clang/test/CoverageMapping >> >> I get: >> >> llvm-lit: /Users/vk/src/llvm.org-coverage-braces/llvm/tools/clang/test/ >> lit.cfg.py:97: note: using clang: '/Volumes/Builds/llvm.org >> -coverage-braces-RA/bin/clang' >> llvm-lit: /Users/vk/src/llvm.org-coverage-braces/llvm/utils/lit/lit/TestingConfig.py:101: >> fatal: unable to parse config file '/Users/vk/src/llvm.org >> -coverage-braces/llvm/tools/clang/test/lit.cfg.py', traceback: Traceback >> (most recent call last): >> File "/Users/vk/src/llvm.org-coverage-braces/llvm/utils/lit/lit/TestingConfig.py", >> line 88, in load_from_path >> exec(compile(data, path, 'exec'), cfg_globals, None) >> File "/Users/vk/src/llvm.org-coverage-braces/llvm/tools/clang/test/ >> lit.cfg.py", line 128, in <module> >> config.substitutions.append( ('%clang_func_map', ' ' + >> lit.util.which('clang-func-mapping', config.environment['PATH']) + ' ') ) >> TypeError: cannot concatenate 'str' and 'NoneType' objects >> >> However, this still works when running tests within llvm: >> >> ./bin/llvm-lit <src>/llvm/test/tools/llvm-cov >> >> I'd appreciate any help in getting this working again. >> >> thanks, >> vedant >> >>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170922/f8c60f45/attachment.html>
Vedant Kumar via llvm-dev
2017-Sep-22 18:36 UTC
[llvm-dev] No longer able to run lit tests within a sub-tool
Ah, the problem goes away once I build clang-func-mapping. I stripped some stuff out, but here's pretty much what clang/test/lit.cfg.py says my PATH is: ** PATH **: /Volumes/Builds/llvm.org-coverage-braces-RA/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin I wonder how this ever worked before, when I didn't have clang-func-mapping built. Anyway, thanks for your help! vedant> On Sep 22, 2017, at 11:31 AM, Zachary Turner <zturner at google.com> wrote: > > This works for me. Can you run "which clang-func-mapping" and also add a line to clang/test/lit.cfg.py <http://lit.cfg.py/> to print the value of config.environment['PATH']? > > On Fri, Sep 22, 2017 at 11:27 AM Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote: > Looking, thanks for the report. > > On Fri, Sep 22, 2017 at 11:22 AM Vedant Kumar <vsk at apple.com <mailto:vsk at apple.com>> wrote: > As of r313998, this workflow no longer works: > > cd <build-dir> > ./bin/llvm-lit <src>/llvm/tools/clang/test/CoverageMapping > > I get: > > llvm-lit: /Users/vk/src/llvm.org <http://llvm.org/>-coverage-braces/llvm/tools/clang/test/lit.cfg.py:97 <http://lit.cfg.py:97/>: note: using clang: '/Volumes/Builds/llvm.org <http://llvm.org/>-coverage-braces-RA/bin/clang' > llvm-lit: /Users/vk/src/llvm.org <http://llvm.org/>-coverage-braces/llvm/utils/lit/lit/TestingConfig.py:101: fatal: unable to parse config file '/Users/vk/src/llvm.org <http://llvm.org/>-coverage-braces/llvm/tools/clang/test/lit.cfg.py <http://lit.cfg.py/>', traceback: Traceback (most recent call last): > File "/Users/vk/src/llvm.org <http://llvm.org/>-coverage-braces/llvm/utils/lit/lit/TestingConfig.py", line 88, in load_from_path > exec(compile(data, path, 'exec'), cfg_globals, None) > File "/Users/vk/src/llvm.org <http://llvm.org/>-coverage-braces/llvm/tools/clang/test/lit.cfg.py <http://lit.cfg.py/>", line 128, in <module> > config.substitutions.append( ('%clang_func_map', ' ' + lit.util.which('clang-func-mapping', config.environment['PATH']) + ' ') ) > TypeError: cannot concatenate 'str' and 'NoneType' objects > > However, this still works when running tests within llvm: > > ./bin/llvm-lit <src>/llvm/test/tools/llvm-cov > > I'd appreciate any help in getting this working again. > > thanks, > vedant >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170922/9e10ca05/attachment.html>
Vedant Kumar via llvm-dev
2017-Sep-22 18:38 UTC
[llvm-dev] No longer able to run lit tests within a sub-tool
> On Sep 22, 2017, at 11:36 AM, Vedant Kumar <vsk at apple.com> wrote: > > Ah, the problem goes away once I build clang-func-mapping. > > I stripped some stuff out, but here's pretty much what clang/test/lit.cfg.py says my PATH is: > > ** PATH **: /Volumes/Builds/llvm.org-coverage-braces-RA/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin > > I wonder how this ever worked before, when I didn't have clang-func-mapping built.Oh, this might be an issue with r313975, which I picked up when rebasing things this morning. vedant> > Anyway, thanks for your help! > > vedant > >> On Sep 22, 2017, at 11:31 AM, Zachary Turner <zturner at google.com> wrote: >> >> This works for me. Can you run "which clang-func-mapping" and also add a line to clang/test/lit.cfg.py to print the value of config.environment['PATH']? >> >> On Fri, Sep 22, 2017 at 11:27 AM Zachary Turner <zturner at google.com> wrote: >> Looking, thanks for the report. >> >> On Fri, Sep 22, 2017 at 11:22 AM Vedant Kumar <vsk at apple.com> wrote: >> As of r313998, this workflow no longer works: >> >> cd <build-dir> >> ./bin/llvm-lit <src>/llvm/tools/clang/test/CoverageMapping >> >> I get: >> >> llvm-lit: /Users/vk/src/llvm.org-coverage-braces/llvm/tools/clang/test/lit.cfg.py:97: note: using clang: '/Volumes/Builds/llvm.org-coverage-braces-RA/bin/clang' >> llvm-lit: /Users/vk/src/llvm.org-coverage-braces/llvm/utils/lit/lit/TestingConfig.py:101: fatal: unable to parse config file '/Users/vk/src/llvm.org-coverage-braces/llvm/tools/clang/test/lit.cfg.py', traceback: Traceback (most recent call last): >> File "/Users/vk/src/llvm.org-coverage-braces/llvm/utils/lit/lit/TestingConfig.py", line 88, in load_from_path >> exec(compile(data, path, 'exec'), cfg_globals, None) >> File "/Users/vk/src/llvm.org-coverage-braces/llvm/tools/clang/test/lit.cfg.py", line 128, in <module> >> config.substitutions.append( ('%clang_func_map', ' ' + lit.util.which('clang-func-mapping', config.environment['PATH']) + ' ') ) >> TypeError: cannot concatenate 'str' and 'NoneType' objects >> >> However, this still works when running tests within llvm: >> >> ./bin/llvm-lit <src>/llvm/test/tools/llvm-cov >> >> I'd appreciate any help in getting this working again. >> >> thanks, >> vedant >> >