The previous patches added the necessary support for global constructors used to register tests. This patch enables the NVPTX target to build and run the unit tests on the GPU. Currently this only tests the ctype tests, but adding more should be straightforward from here on. This ran all the ctest unit tests when run on an sm_70. Depends on D149517 D149527 Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149532
18 lines
367 B
CMake
18 lines
367 B
CMake
if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
|
|
return()
|
|
endif()
|
|
|
|
add_custom_target(libc_unittest_tests)
|
|
|
|
add_libc_unittest(
|
|
testfilter_test
|
|
SUITE
|
|
libc_unittest_tests
|
|
SRCS
|
|
testfilter_test.cpp
|
|
DEPENDS
|
|
# TODO(michaelrj): Remove this dependancy. It's only here because all unit
|
|
# tests must have at least one dependancy.
|
|
libc.src.__support.CPP.bit
|
|
)
|