[cfe-dev] run integration tests for single file

Alexander Droste alexander.ra.droste at googlemail.com
Mon Aug 10 09:04:25 PDT 2015


Hi,

thanks for your reply.
I have positioned the test file in llvm/tools/clang/test/Analysis
which includes a lot of other regression test files.
For each other file I tried, the llvm-lit command works.
A lit config file is contained in that folder.
I think the question is how the lit configuration can be
regenerated/configured to fix the issue.

Best regards,
Alex

On 10.08.15 16:44, David Blaikie wrote:
> 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
>>
>



More information about the cfe-dev mailing list