[llvm-dev] GTest: Unit tests layout

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 25 08:22:26 PDT 2017


The advantage of the existing structure is that each test has a minimal set
of dependencies. This mostly matters for SupportTests, ADTTests, and
IRTests. It's nice to be able to add functionality to those headers and
unit test them without triggering rebuilds of every Transform and Analysis
file that uses them. Also, they generally link faster than the llc and opt
binaries, which is nice.

The tests that depend on Transforms could probably be merged without
sacrificing much incremental build performance.

The obvious downside of fine-grained testing executables is that it
increases the total build directory size and total work to link and run all
tests. =(

On Mon, Sep 25, 2017 at 8:13 AM, Paweł Bylica via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello everyone,
>
> Are there any reasons the unittests in LLVM repo are split into
> independent executables, e.g. ADTTests, AnalysisTests, etc.
>
> Are there any performance or easy-to-use reasons for this?
>
> I plan to migrate to GTest from a project where we have all unittests in a
> single executable.
>
> - Paweł
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170925/4637d5fc/attachment.html>


More information about the llvm-dev mailing list