At the moment, I'm setting up the tests for each major LLVM package as a separate directory under "unittests" using PARALLEL_DIRS.<div><br></div><div>Now, if I could just figure out how to get it to not put the executable somewhere other than $(BuildMode)/bin... :(<br>
<br><div class="gmail_quote">On Mon, Dec 29, 2008 at 3:10 PM, Keir Mierle <span dir="ltr"><<a href="mailto:mierle@gmail.com">mierle@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><div></div><div class="Wj3C7c">On Mon, Dec 29, 2008 at 1:57 PM, Misha Brukman <span dir="ltr"><<a href="mailto:brukman@gmail.com" target="_blank">brukman@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_quote">
<div><div></div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div>2008/12/29 Talin <span dir="ltr"><<a href="mailto:viridia@gmail.com" target="_blank">viridia@gmail.com</a>></span><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


Do the existing tests use a wildcard rule to gather all test sources? We would need to insure that the wildcard rule for the unit tests and the large tests are mutually exclusive.<div></div></blockquote><div><br>By "large tests", I assume you mean the .ll tests?  Those are one-file-per-test.  Also, if you use Chris' suggestion on directories, it will separate the unit tests from the large tests.<br>


 </div><div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div>Also, will the unit tests be one executable or many? They will probably compile/run faster if there is a smaller number of executables.</div>


</blockquote></div><div><br>Yes, I agree, they'll link faster if we have fewer tests.  I would not want a single massive test for all of LLVM -- how about 1 test binary per major directory in llvm/lib, unless it's really necessary to split them up, e.g. target-dependent unittests, but each .cpp file would ideally have its own _test.cpp file, so it's easier to keep the tests for different modules separate.</div>

</div></blockquote></div></div><div><br>One nice feature of gtest is automatic test collection. If the llvm tests all use the same main(), and the main() is not repeated in the individual unittest files, then it is trivial to have a) one massive binary that contains all the tests (fast to build & run all unittests pre-checkin) and separate binaries per .cpp (i.e. foo.cc, foo_test.cc, and foo_test binary) for fast iterating which would only be built and run when explicitly called from the makefile (i.e. they would not be run by the build-all-unittest make target).<br>

<br>On the other hand, if separate binaries are built, then a make unittest target could parallelize trivially by adding -jX. I belive fork-level parallelism within a single test binary is in coming to gtest, but is not available yet.<br>

<br>Keir<br><br>.<br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div class="gmail_quote"><div><br>
</div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div></div><br>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>
</div>