Sidney San Martín via llvm-dev
2016-Feb-09 20:07 UTC
[llvm-dev] New contributor, `make test` not doing anything
I came to the recent LLVM/Clang hackathon and made a new checker for clang-tidy. I'm working on wrapping up and submitting my patch, and I can't seem to run the tests. - First, I followed the instructions at http://clang.llvm.org/hacking.html#testingNonWindows. I ran `make test` in my build directory, and also tried running `make` in the `test` subdirectory. They both exited in under a second with no output. - Then, I tried doing the same thing in the `tools/clang/tools/extra` subdirectory of my build directory, where clang-tidy lives. Same result. - Finally, I found http://clang.llvm.org/extra/clang-tidy/#testing-checks. This explains how to create tests but not how to run them. I made a relatively wonky command line that seems to run my test successfully (along the lines of `PATH=$PATH:$BUILD_DIR/bin ./check_clang_tidy.py ../../test/clang-tidy/misc-my-check.cpp misc-my-check /tmp/foo.tmp`), but it doesn't feel right. What should I be doing instead? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160209/e628670b/attachment.html>
Mehdi Amini via llvm-dev
2016-Feb-09 20:20 UTC
[llvm-dev] New contributor, `make test` not doing anything
You'll probably have better chance on the cfe-dev mailing-list (LLVM-dev to BCC). -- Mehdi> On Feb 9, 2016, at 12:07 PM, Sidney San Martín via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > I came to the recent LLVM/Clang hackathon and made a new checker for clang-tidy. I'm working on wrapping up and submitting my patch, and I can't seem to run the tests. > > - First, I followed the instructions at http://clang.llvm.org/hacking.html#testingNonWindows <http://clang.llvm.org/hacking.html#testingNonWindows>. I ran `make test` in my build directory, and also tried running `make` in the `test` subdirectory. They both exited in under a second with no output. > > - Then, I tried doing the same thing in the `tools/clang/tools/extra` subdirectory of my build directory, where clang-tidy lives. Same result. > > - Finally, I found http://clang.llvm.org/extra/clang-tidy/#testing-checks <http://clang.llvm.org/extra/clang-tidy/#testing-checks>. This explains how to create tests but not how to run them. I made a relatively wonky command line that seems to run my test successfully (along the lines of `PATH=$PATH:$BUILD_DIR/bin ./check_clang_tidy.py ../../test/clang-tidy/misc-my-check.cpp misc-my-check /tmp/foo.tmp`), but it doesn't feel right. > > What should I be doing instead? > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160209/b7b62827/attachment.html>
Daniel Sanders via llvm-dev
2016-Feb-12 10:33 UTC
[llvm-dev] New contributor, `make test` not doing anything
Hi, I haven't come across 'make test' before and this target doesn't exist when building with ninja. I'm guessing that make is checking whether 'test' is up to date, finding the './test' directory, and concluding there's nothing to do. I think you're looking for 'make check-all'. There's various check-* targets for particular subsets of the tests but I don't know the one for clang-tidy's tests. From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Sidney San Martín via llvm-dev Sent: 09 February 2016 20:08 To: llvm-dev at lists.llvm.org Subject: [llvm-dev] New contributor, `make test` not doing anything I came to the recent LLVM/Clang hackathon and made a new checker for clang-tidy. I'm working on wrapping up and submitting my patch, and I can't seem to run the tests. - First, I followed the instructions at http://clang.llvm.org/hacking.html#testingNonWindows. I ran `make test` in my build directory, and also tried running `make` in the `test` subdirectory. They both exited in under a second with no output. - Then, I tried doing the same thing in the `tools/clang/tools/extra` subdirectory of my build directory, where clang-tidy lives. Same result. - Finally, I found http://clang.llvm.org/extra/clang-tidy/#testing-checks. This explains how to create tests but not how to run them. I made a relatively wonky command line that seems to run my test successfully (along the lines of `PATH=$PATH:$BUILD_DIR/bin ./check_clang_tidy.py ../../test/clang-tidy/misc-my-check.cpp misc-my-check /tmp/foo.tmp`), but it doesn't feel right. What should I be doing instead? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160212/d3e396a1/attachment.html>