[llvm-dev] Unit Tests CMake configuration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Unit Tests CMake configuration

Bruce Hoult via llvm-dev
Hi llvm-dev,

Does anybody know why we're not using the `add_test` feature in CMake
[0] for unit tests? In particular, compiler-rt (sanitizers and xray)
has a number of unit tests which could really just be built as normal
binaries and invoked appropriately.

If we're avoiding ctest [1], then for the unit tests in compiler-rt
I'd like to see whether just using normal binaries can make the build
faster. The 'Generating TEST_OBJECTS.*' messages seem to indicate that
these are executed sequentially, or cannot be parallelized by
ninja-build [2] and take a really long time to complete.

Thoughts?

[0] https://cmake.org/cmake/help/v3.4/command/add_test.html
[1] https://cmake.org/cmake/help/v3.4/manual/ctest.1.html#manual:ctest(1)
[2] https://ninja-build.org/

--
Dean
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Unit Tests CMake configuration

Bruce Hoult via llvm-dev
On Tue, Jun 5, 2018 at 6:02 PM Dean Michael Berris
<[hidden email]> wrote:

>
> Hi llvm-dev,
>
> Does anybody know why we're not using the `add_test` feature in CMake
> [0] for unit tests? In particular, compiler-rt (sanitizers and xray)
> has a number of unit tests which could really just be built as normal
> binaries and invoked appropriately.
>
> If we're avoiding ctest [1], then for the unit tests in compiler-rt
> I'd like to see whether just using normal binaries can make the build
> faster. The 'Generating TEST_OBJECTS.*' messages seem to indicate that
> these are executed sequentially, or cannot be parallelized by
> ninja-build [2] and take a really long time to complete.
>

Okay, it's not sequential -- but it seems like the sanitizer builds
are taking a long time.

Anybody aware of changes recently that would cause the sanitizer
builds to take longer? Maybe changes in the compiler?

Adding in Kostya and Evgeniy.

In particular, I'm seeing really bad build times with
msan-instrumented unit tests when doing in-tree builds.

--
Dean
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Unit Tests CMake configuration

Bruce Hoult via llvm-dev
In reply to this post by Bruce Hoult via llvm-dev
2018-06-05 3:02 GMT-05:00 Dean Michael Berris via llvm-dev
<[hidden email]>:
> Does anybody know why we're not using the `add_test` feature in CMake
> [0] for unit tests? In particular, compiler-rt (sanitizers and xray)
> has a number of unit tests which could really just be built as normal
> binaries and invoked appropriately.

I assume this is mostly historical when LLVM was using GNU autotools,
i.e. there was no ctest back then, and LLVM introduced llvm-lit
(2009-09-08; could also have used dejagnu). The first CMakeLists.txt
was introduced in 2008-09-21, but the autotools build was still
present until 2016.

Michael
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Unit Tests CMake configuration

Bruce Hoult via llvm-dev
On Wed, Jun 6, 2018 at 5:26 AM Michael Kruse <[hidden email]> wrote:

>
> 2018-06-05 3:02 GMT-05:00 Dean Michael Berris via llvm-dev
> <[hidden email]>:
> > Does anybody know why we're not using the `add_test` feature in CMake
> > [0] for unit tests? In particular, compiler-rt (sanitizers and xray)
> > has a number of unit tests which could really just be built as normal
> > binaries and invoked appropriately.
>
> I assume this is mostly historical when LLVM was using GNU autotools,
> i.e. there was no ctest back then, and LLVM introduced llvm-lit
> (2009-09-08; could also have used dejagnu). The first CMakeLists.txt
> was introduced in 2008-09-21, but the autotools build was still
> present until 2016.
>

Thanks, that's interesting.

Any thoughts from others on whether it's worth changing this?

--
Dean
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev