[LLVMdev] Unit test patch, updated

Talin viridia at gmail.com
Tue Dec 30 13:07:01 PST 2008


Here's the version of the unit test patch, incorporating the feedback I have
received so far.
Some notes on the patch:

   - This patch doesn't include googletest itself, that will need to be
   checked in separately. The source distribution will live in
   llvm/utils/unittest/googletest. (The reason for the extra directory level is
   so that the LLVM-specific makefiles can live in llvm/utils/unittest, while
   the googletest directory itself can be the pristine, unmodified
   distribution.)
   - The individual tests are in llvm/unittests (note plural).
   - The makefile target to build and run the tests is "make unittest" (I
   wasn't sure if you could have a synthetic target that was the same as the
   name of a directory, so I made it "unittest" instead of "unittests")
   - There's a common Makefile and a common TestMain.cpp in llvm/unittests.
   The individual tests are in llvm/unittests/<dir> where <dir> is the name of
   an LLVM library such as "ADT". Each of these subdirs has a tiny makefile
   which sets TESTNAME=<name> and then includes the common Makefile.unittest.
   Each subdir under unittests creates a separate executable. (I didn't use the
   default googletest main because I figured at some point we might want to
   customize main().)
   - I updated the LICENSE.txt and mkpatch, but I haven't done the HTML docs
   yet because I am still thinking about what to write.
   - I probably made some mistakes in setting up the makefile rules - that
   is what took the most time - so it will merit heightened scrutiny.

-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081230/7dd86e49/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unittest.patch
Type: application/octet-stream
Size: 12295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081230/7dd86e49/attachment.obj>


More information about the llvm-dev mailing list