[PATCH] D51561: [CMake] Add support for unittests that have input files
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 6 15:22:29 PDT 2018
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
More information about the llvm-commits
mailing list