[llvm-dev] Help required on running the regression tests

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 14 03:11:02 PDT 2019

On Fri, 14 Jun 2019 at 10:10, Joan Lluch via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I read the available documentation in https://llvm.org/docs/TestingGuide.html  but that's mostly a general description on what’s available rather than an “guide”.

It mentions the main commands: "make check-all" will run the
regression tests for all built components. There are also more
specific targets like "check" (LLVM only), "check-clang", ...

If you're using ninja you can get it to list them with something like
"ninja -t targets | grep check".

> - From the command line (terminal app) I tried to execute python lit.site.cfg.py , however I get the following error:
> File "/Users/joan/LLVM+CLANG/build/test/lit.site.cfg.py", line 6, in <module>
>     config.host_triple = "x86_64-apple-darwin16.7.0"
> NameError: name 'config' is not defined

A tool bin/llvm-lit is generated for running tests either individually
or when pointed at a test directory. It takes care of the needed
imports, PYTHONPATHs and so on. It's invoked by the "check" targets in
make. That's the only real way to interact with lit stuff directly.

It's mostly useful when debugging a single test that's failed
"bin/llvm-lit -v /path/to/test.ll"  quickly tells you if your
attempted fix has worked. I occasionally use it to test all CodeGen
for a particular target without running other things that I don't care
about right now ("bin/llvm-lit -v



More information about the llvm-dev mailing list