[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:05:52 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
----------------
lntue wrote:

Just found out that `NO_RUN_POSTBUILD` flag support was not added for hermetic test:
https://github.com/llvm/llvm-project/blob/main/libc/cmake/modules/LLVMLibCTestRules.cmake#L645

We should add that option for hermetic test there, similar to unit tests in https://github.com/llvm/llvm-project/blob/main/libc/cmake/modules/LLVMLibCTestRules.cmake#L197

https://github.com/llvm/llvm-project/pull/133978


More information about the libc-commits mailing list