118 changes: 56 additions & 62 deletions libc/test/src/math/smoke/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -758,38 +758,35 @@ add_fp_unittest(
libc.src.math.frexpf128
)

# FIXME: These tests are currently broken for NVPTX.
if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
add_fp_unittest(
ilogb_test
SUITE
libc-math-smoke-tests
SRCS
ilogb_test.cpp
HDRS
ILogbTest.h
DEPENDS
libc.src.math.ilogb
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.manipulation_functions
)
add_fp_unittest(
ilogb_test
SUITE
libc-math-smoke-tests
SRCS
ilogb_test.cpp
HDRS
ILogbTest.h
DEPENDS
libc.src.math.ilogb
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.manipulation_functions
)

add_fp_unittest(
ilogbf_test
SUITE
libc-math-smoke-tests
SRCS
ilogbf_test.cpp
HDRS
ILogbTest.h
DEPENDS
libc.src.math.ilogbf
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.manipulation_functions
)
endif()
add_fp_unittest(
ilogbf_test
SUITE
libc-math-smoke-tests
SRCS
ilogbf_test.cpp
HDRS
ILogbTest.h
DEPENDS
libc.src.math.ilogbf
libc.src.__support.CPP.limits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.manipulation_functions
)

add_fp_unittest(
ilogbl_test
Expand Down Expand Up @@ -1417,38 +1414,35 @@ add_fp_unittest(
UNIT_TEST_ONLY
)

# FIXME: These tests are currently spurious for NVPTX.
if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
add_fp_unittest(
nextafter_test
SUITE
libc-math-smoke-tests
SRCS
nextafter_test.cpp
HDRS
NextAfterTest.h
DEPENDS
libc.include.math
libc.src.math.nextafter
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fp_bits
)
add_fp_unittest(
nextafter_test
SUITE
libc-math-smoke-tests
SRCS
nextafter_test.cpp
HDRS
NextAfterTest.h
DEPENDS
libc.include.math
libc.src.math.nextafter
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fp_bits
)

add_fp_unittest(
nextafterf_test
SUITE
libc-math-smoke-tests
SRCS
nextafterf_test.cpp
HDRS
NextAfterTest.h
DEPENDS
libc.include.math
libc.src.math.nextafterf
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fp_bits
)
endif()
add_fp_unittest(
nextafterf_test
SUITE
libc-math-smoke-tests
SRCS
nextafterf_test.cpp
HDRS
NextAfterTest.h
DEPENDS
libc.include.math
libc.src.math.nextafterf
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.fp_bits
)

add_fp_unittest(
nextafterl_test
Expand Down
50 changes: 22 additions & 28 deletions libc/test/src/stdlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,17 @@ add_libc_test(
libc.src.stdlib.atoll
)

# This fails on NVPTX where the output value is one-off of the expected value.
if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
add_fp_unittest(
strtod_test
SUITE
libc-stdlib-tests
SRCS
strtod_test.cpp
DEPENDS
libc.src.errno.errno
libc.src.stdlib.strtod
libc.src.__support.FPUtil.fenv_impl
)
endif()
add_fp_unittest(
strtod_test
SUITE
libc-stdlib-tests
SRCS
strtod_test.cpp
DEPENDS
libc.src.errno.errno
libc.src.stdlib.strtod
libc.src.__support.FPUtil.fenv_impl
)

add_fp_unittest(
strtof_test
Expand Down Expand Up @@ -126,20 +123,17 @@ add_libc_test(
.strtol_test_support
)

# This fails on NVPTX where the output value is one-off of the expected value.
if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
add_libc_test(
strtold_test
SUITE
libc-stdlib-tests
SRCS
strtold_test.cpp
DEPENDS
libc.src.errno.errno
libc.src.__support.uint128
libc.src.stdlib.strtold
)
endif()
add_libc_test(
strtold_test
SUITE
libc-stdlib-tests
SRCS
strtold_test.cpp
DEPENDS
libc.src.errno.errno
libc.src.__support.uint128
libc.src.stdlib.strtold
)

add_libc_test(
strtoll_test
Expand Down
26 changes: 11 additions & 15 deletions libc/test/src/time/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,17 @@ add_libc_unittest(
libc.src.__support.CPP.limits
)

# Sleeping is not supported on older NVPTX architectures.
set(unsupported_architectures "sm_35;sm_37;sm_50;sm_52;sm_53;sm_60;sm_61;sm_62")
if (NOT ("${LIBC_GPU_TARGET_ARCHITECTURE}" IN_LIST unsupported_architectures))
add_libc_test(
nanosleep_test
SUITE
libc_time_unittests
SRCS
nanosleep_test.cpp
DEPENDS
libc.include.time
libc.src.time.nanosleep
libc.src.errno.errno
)
endif()
add_libc_test(
nanosleep_test
SUITE
libc_time_unittests
SRCS
nanosleep_test.cpp
DEPENDS
libc.include.time
libc.src.time.nanosleep
libc.src.errno.errno
)

add_libc_unittest(
time_test
Expand Down