I'm working on an update to the patch. The only thing holding me up is trying to come to a final decision as to where all the various pieces should live. Specifically, the Google Test library, and the actual unit tests themselves.<div>
<div><br><div class="gmail_quote">On Mon, Dec 29, 2008 at 9:17 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.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="Ih2E3d">On Dec 27, 2008, at 8:54 PM, Talin wrote:<br>
> Although I haven't actually tried Boost.Test, I kind of figured that<br>
> this would be the case - that you pretty much have to drink the "Boost<br>
> Kool-Aid" in order to use it.<br>
<br>
</div>I agree, boost.test seems like a non-starter from many reasons.<br>
<div class="Ih2E3d"><br>
>> So are you planning on maintaining whatever test system, or just have<br>
>> them as a pre-requisite. For example are you going to have the gtest<br>
>> incorporated, or have them install it separately first? I was under<br>
>> the impression that the user would have to install gtest first.<br>
> So the plan is to take a snapshot of gtest and check it in to the LLVM<br>
> tree, rather than have it installed separately.<br>
<br>
</div>Yes, we'd want to either do this, or have the configure machinery<br>
detect an installed copy and only enable unit testing if present.  If<br>
the goal is to make everyone run unit tests, embedding a copy would be<br>
the best way to go.<br>
<div class="Ih2E3d"><br>
> This means that keeping the gtest snapshot up to date will be trivial,<br>
> since it will only require copying in the latest gtest snapshot and<br>
> checking it in to LLVM - presuming that gtest remains backwards<br>
> compatible, which I assume it will.<br>
<br>
</div>This is only an issue if the latest and greatest versions of gtest add<br>
something we need.  My understanding of unit testing is fairly<br>
limited, but I don't forsee major new innovations regularly happening<br>
that we'll need to bring in on a frequent basis.  Doing a periodic<br>
synch (once every year or two) will probably be fine.<br>
<div class="Ih2E3d"><br>
><br>
> Licensing-wise, both LLVM and gtest are distributed under a fairly<br>
> permissive BSD-style license. I don't know who would make the<br>
> judgement<br>
> call as to whether or not the licenses can co-exist. However, since<br>
> neither license is "viral" in the sense of wanting to apply any sort<br>
> of<br>
> restriction on derived works or the "work as a whole", I see no<br>
> barrier<br>
> to shipping a combined product with different portions falling under<br>
> different licenses. Thus, the unit tests themselves would still fall<br>
> under the LLVM license, and linking the unit tests with gtest would<br>
> not<br>
> violate either license. Of course, IANAL.<br>
<br>
</div>The licenses coexist.  Please just add an entry to the llvm/<br>
LICENSES.txt file.<br>
<div class="Ih2E3d"><br>
> My personal goal is that one should be able to check out the head of<br>
> LLVM on a generic Linux/OS-X system, with only the standard<br>
> development<br>
> environment (i.e. make/gcc/etc) and type "make unittest" and have the<br>
> tests run.<br>
<br>
</div>Yep.  BTW, do these tests run in parallel with make -jN?  If not,<br>
please make them :)<br>
<div class="Ih2E3d"><br>
> In the longer term, I'd like to see LLVM have an automated build that<br>
> runs the unit tests as part of the build. I noticed that gtest has an<br>
> option to output test results in XML form, although I have not played<br>
> with this personally, it might be useful in this regard.<br>
<br>
</div>The only thing I'm concerned about here is extending build time.  For<br>
example, if we have a lot of unit tests for libsupport (e.g.<br>
densemap), I wouldn't want those tests to be run unless libsupport<br>
changes.  It should just be a "small matter of makefile hackery" to<br>
get this going I suppose.<br>
<br>
Is there a final proposed version of the patch with the changes Misha<br>
asked for?  If so, I'll review and commit it when I have time.<br>
<font color="#888888"><br>
-Chris<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>
</div></div>