Unable to run clang tests using llvm-lit

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Unable to run clang tests using llvm-lit

Keane, Erich via cfe-dev
Hi,

I'm trying to run clang tests to test my changes. I have referred the
docs at http://clang.llvm.org/hacking.html#testingCommands
Currently I'm facing the issue below:

$ ./bin/llvm-lit -sv --param=build_config=RelWithDebInfo
--param=clang_site_config=/home/parallels/llvm-avr/build/tools/clang/test/lit.site.cfg
/home/parallels/code/llvm-project.git/clang/test/
llvm-lit: /home/parallels/llvm-avr/build/bin/../../../code/llvm-project.git/llvm/utils/lit/lit/TestingConfig.py:101:
fatal: unable to parse config file
'/home/parallels/code/llvm-project.git/clang/test/lit.cfg.py',
traceback: Traceback (most recent call last):
  File "/home/parallels/llvm-avr/build/bin/../../../code/llvm-project.git/llvm/utils/lit/lit/TestingConfig.py",
line 88, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/home/parallels/code/llvm-project.git/clang/test/lit.cfg.py",
line 25, in <module>
    config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
AttributeError: 'NoneType' object has no attribute 'use_lit_shell'

$ ./bin/llvm-lit --show-tests ~/code/llvm-project.git/clang/test/
llvm-lit: /home/parallels/llvm-avr/build/bin/../../../code/llvm-project.git/llvm/utils/lit/lit/TestingConfig.py:101:
fatal: unable to parse config file
'/home/parallels/code/llvm-project.git/clang/test/lit.cfg.py',
traceback: Traceback (most recent call last):
  File "/home/parallels/llvm-avr/build/bin/../../../code/llvm-project.git/llvm/utils/lit/lit/TestingConfig.py",
line 88, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/home/parallels/code/llvm-project.git/clang/test/lit.cfg.py",
line 25, in <module>
    config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
AttributeError: 'NoneType' object has no attribute 'use_lit_shell'

Whereas the show-tests for llvm (./bin/llvm-lit --show-tests
~/code/llvm-project.git/clang/test/) works fine.

Someone already mentioned similar issue in one of code review:
https://reviews.llvm.org/D61798?id=

Source: https://github.com/llvm/llvm-project.git, up to date with
31-Jul-2020 commits.

Am I missing anything to set up the environment?
Please suggest any workarounds if any.

Regards,
Pitchumani
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev