[cfe-dev] run integration tests for single file

David Blaikie dblaikie at gmail.com
Mon Aug 10 07:44:16 PDT 2015


On Mon, Aug 10, 2015 at 6:19 AM, Alexander Droste <
alexander.ra.droste at googlemail.com> wrote:

> Hi everyone,
>
> I'm trying to run some integration tests, defined in a single
> file, for a static analysis check I wrote.
>
>
> https://github.com/0ax1/MPI-Checker/blob/master/tests/integration_tests/MPICheckerTest.c
>
> When I run the complete Clang test-suite (calling "ninja clang-test") for
> integration tests, the tests I defined get executed and work as expected
> but
> calling "llvm-lit MPICheckerTest.c" yields:
>
> "llvm-lit: discovery.py:113: warning: unable to find test suite for
> 'MPICheckerTest.c' llvm-lit: discovery.py:224: warning: input
> 'MPICheckerTest.c'
> contained no tests.."
>
> In the docs (http://llvm.org/docs/TestingGuide.html) it is stated that in
> order
> to add a test, configure/make should be called.
> But in the llvm/test folder I do not have a configure script (I used ninja
> to
> build LLVM) and simply calling make does not work ("../Makefile.config: No
> such
> file ...").
>
> Can anybody help out?
>

I'm not sure what ways work/are meant to work, but the way that works for
me is this:

>From the build directory you run ninja in, run "./bin/llvm-lit -v
test/CodeGen/foo.ll" etc. (ie: the source relative path in LLVM)

Oh, you're running tests that aren't part of Clang or LLVM's test suite?
That I'm less (not at all) familiar with, but you might need a lit config
file in the directory parent chain of the test file you're running (check
the ones in LLVM's suite for example)

- Dave


>
> Best regards,
> Alex
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150810/7ddc503c/attachment.html>


More information about the cfe-dev mailing list