[libc-commits] [libc] [libc][test] make `str_to_float_comparison_test` independent of C++ headers. (PR #133978)
via libc-commits
libc-commits at lists.llvm.org
Tue Apr 1 22:06:53 PDT 2025
================
@@ -249,31 +249,26 @@ add_libc_test(
libc.src.__support.memory_size
)
-# FIXME: We shouldn't have regular executables created because we could be
-# cross-compiling the tests and running through an emulator.
if(NOT LIBC_TARGET_OS_IS_GPU)
- add_executable(
- libc_str_to_float_comparison_test
- str_to_float_comparison_test.cpp
- )
-
- target_link_libraries(libc_str_to_float_comparison_test
- PRIVATE
- "${LIBC_TARGET}"
- )
-
- add_executable(
- libc_system_str_to_float_comparison_test
- str_to_float_comparison_test.cpp
+ add_libc_test(
+ str_to_float_comparison_test
+ SUITE
+ libc-support-tests
+ NO_RUN_POSTBUILD
+ ENV "FILES=${CMAKE_CURRENT_SOURCE_DIR}/str_to_float_comparison_data.txt"
----------------
lntue wrote:
On the other hand, `ENV` is not added for unit test, only hermetic tests and integration tests. It should also be added for unit tests.
https://github.com/llvm/llvm-project/pull/133978
More information about the libc-commits
mailing list