[PATCH] D51561: [CMake] Add support for unittests that have input files

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 15:40:46 PDT 2018


These aren't demangle tests fwiw.  But that just complicates the cmake
logic, and I don't see the benefit of doing so.  Writing 3k of data to the
disk is hardly going to be a noticeable part of the configure step.

On Thu, Sep 6, 2018 at 3:22 PM Nico Weber via Phabricator <
reviews at reviews.llvm.org> wrote:

> thakis added a comment.
>
> In https://reviews.llvm.org/D51561#1226388, @zturner wrote:
>
> > Doesn’t mean it’s a good or bad pattern, just that “only 1 file will use
> >  it” is already false, because we can make lldb use it as a followup and
> >  that will get many more.
> >
> > I did think about alternative solutions, If this CL wasn’t here, the
> >  alternatives i came up would be to either not write this test, or spend
> >  several days/weeks writing a tool whose only purpose was to make it
> >  possible to write this test.
>
>
> If you're dead set on this approach, please do make it opt in. Something
> like:
>
>   function(add_file_reading_unittest test_suite test_name)
>     set(LLVM_UNITTEST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
>     configure_file(
>       ${LLVM_MAIN_SRC_DIR}/unittests/unittest.cfg.in
>       ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llvm.srcdir.txt)
>     add_unittests(test_suite test_name)
>   endfunction()
>
> ...and then make DemangleTests call that function.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D51561
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/0b86cfad/attachment.html>


More information about the llvm-commits mailing list