<div dir="ltr">Thanks to both of you! These work.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 9, 2016 at 4:14 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Feb 9, 2016 at 12:23 PM, Sidney San MartÃn<br>
<<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
> (Reposted from llvm-dev)<br>
><br>
> I came to the recent LLVM/Clang hackathon and made a new checker for<br>
> clang-tidy. I'm working on wrapping up and submitting my patch, and I can't<br>
> seem to run the tests.<br>
><br>
> - First, I followed the instructions at<br>
> <a href="http://clang.llvm.org/hacking.html#testingNonWindows" rel="noreferrer" target="_blank">http://clang.llvm.org/hacking.html#testingNonWindows</a>. I ran `make test` in<br>
> my build directory, and also tried running `make` in the `test`<br>
> subdirectory. They both exited in under a second with no output.<br>
><br>
> - Then, I tried doing the same thing in the `tools/clang/tools/extra`<br>
> subdirectory of my build directory, where clang-tidy lives. Same result.<br>
><br>
> - Finally, I found <a href="http://clang.llvm.org/extra/clang-tidy/#testing-checks" rel="noreferrer" target="_blank">http://clang.llvm.org/extra/clang-tidy/#testing-checks</a>.<br>
> This explains how to create tests but not how to run them. I made a<br>
> relatively wonky command line that seems to run my test successfully (along<br>
> the lines of `PATH=$PATH:$BUILD_DIR/bin ./check_clang_tidy.py<br>
> ../../test/clang-tidy/misc-my-check.cpp misc-my-check /tmp/foo.tmp`), but it<br>
> doesn't feel right.<br>
><br>
> What should I be doing instead?<br>
<br>
</div></div>Wow, that documentation is extremely out of date.<br>
<br>
Use the build target 'check-clang' to run the Clang tests, and<br>
'check-clang-tools' to run the tests for clang's tools/extra. These<br>
should be run from the build directory, not from the 'test' directory.<br>
</blockquote></div><br></div>