Eli~<div><br></div><div>Thanks for the pointer to the right place.  A patch is attached.</div><div><br></div><div>Matt<br><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 10:59 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</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, Apr 10, 2012 at 7:44 PM, Matt Fowles <<a href="mailto:matt.fowles@gmail.com">matt.fowles@gmail.com</a>> wrote:<br>


> Eli~<br>
><br>
> I am interested in clang development and this seemed like an easy enough bug<br>
> to start with so I thought I would try it out.  I have managed to get llvm<br>
> checked out and building without problems.  I found the tests and have<br>
> turned the above example into a test in a new file<br>
> `test/SemaCXX/inner-pod-struct.cpp`.<br>
><br>
> Unfortunately, I cannot figure out how to use lit.py properly.  I have<br>
> looked at<br>
><br>
> <a href="http://clang.llvm.org/hacking.html#testingNonWindows" target="_blank">http://clang.llvm.org/hacking.html#testingNonWindows</a><br>
><br>
> but am a bit confused as it refers to non-existant files in several places.<br>
>  In particular,<br>
><br>
><br>
> python (path to llvm)\llvm\utils\lit\lit.py -sv<br>
>   --param=build_mode=Win32 --param=build_config=Debug<br>
>   --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg<br>
>   (path to llvm)\llvm\tools\clang\test\(dir)\(test)<br>
><br>
><br>
> is giving me trouble.  On my machine, ~/dev/llvm is the llvm checkout and<br>
> ~/dev/llvm-build is the build dir.<br>
><br>
> boots@eiji:~/dev/llvm-build$ find . -name lit.site.cfg<br>
> boots@eiji:~/dev/llvm-build$<br>
><br>
><br>
> Kind of a bust there, what about the llvm dir?<br>
><br>
><br>
> boots@eiji:~/dev/llvm$ find . -name lit.site.cfg<br>
> ./utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.site.cfg<br>
> ./utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/lit.site.cfg<br>
> ./utils/lit/lit/ExampleTests.ObjDir/lit.site.cfg<br>
><br>
><br>
> Something at least.<br>
><br>
><br>
> boots@eiji:~/dev/llvm-build$ python ~/dev/llvm/utils/lit/lit.py<br>
> --param=clang_site_config=../llvm/./utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/lit.site.cfg<br>
> /Users/boots/dev/llvm/tools/clang/test/<br>
> -- Testing: 1 tests, 4 threads --<br>
> PASS: LLVM :: Foo/pct-S.ll (1 of 1)<br>
> Testing Time: 0.28s<br>
>   Expected Passes    : 1<br>
><br>
><br>
> But wait, that ran entirely the wrong tests?<br>
><br>
><br>
> boots@eiji:~/dev/llvm$ find . -name pct-S.ll<br>
> ./utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/pct-S.ll<br>
><br>
><br>
> ... Time passes while I hack and compose this email ...<br>
><br>
> I discover that:<br>
><br>
><br>
> boots@eiji:~/dev/llvm-build$ cd tools/clang/<br>
> boots@eiji:~/dev/llvm-build/tools/clang$ make test<br>
> Making Clang 'lit.site.cfg' file...<br>
> Making Clang 'Unit/lit.site.cfg' file...<br>
> oots@eiji:~/dev/llvm-build/tools/clang/test$ python<br>
> ~/dev/llvm/utils/lit/lit.py --param=clang_site_config=lit.site.cfg<br>
> ~/dev/llvm/tools/clang/test/SemaCXX/inner-pod-struct.cpp<br>
> lit.py: lit.cfg:175: note: using clang:<br>
> '/Users/boots/dev/llvm-build/Release+Asserts/bin/clang'<br>
> -- Testing: 1 tests, 4 threads --<br>
> FAIL: Clang :: SemaCXX/inner-pod-struct.cpp (1 of 1)<br>
> Testing Time: 0.28s<br>
> ********************<br>
> Failing Tests (1):<br>
>     Clang :: SemaCXX/inner-pod-struct.cpp<br>
><br>
>   Unexpected Failures: 1<br>
><br>
><br>
> Is the incantation I need.<br>
><br>
> Can we expand the testing page slightly to include mention that you have to<br>
> run `make test` in the build/tools/clang directory to generate the cfg<br>
> files?<br>
<br>
</div></div>Patch welcome.  (The relevant webpage is www/hacking.html in a clang checkout.)<br>
<span class="HOEnZb"><font color="#888888"><br>
-Eli<br>
</font></span></blockquote></div><br></div>