[libc-commits] [libc] [libc][test] Condition out tests that can't work on bare metal (PR #215830)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Sun Aug 16 09:24:59 PDT 2026


================
@@ -30,15 +36,14 @@ function(_get_common_test_compile_options output_var c_test flags)
   libc_add_definition(compile_options
     "LIBC_TEST_SUBPROCESS_TESTS=${LIBC_TEST_SUBPROCESS_TESTS}")
 
-  if(LIBC_TEST_SUBPROCESS_TESTS)
-    # EXPECT_DEATH and ASSERT_DEATH might be quite slow.  LIBC_TEST_SKIP_DEATH_TESTS
-    # will make those tests no-op to reduce the overall test time.
-    if(LIBC_TEST_SKIP_DEATH_TESTS)
-      if(LIBC_CMAKE_VERBOSE_LOGGING)
-        message(STATUS "LIBC_TEST_SKIP_DEATH_TESTS is set.  EXPECT_DEATH/ASSERT_DEATH are no-op.")
-      endif()
-      list(APPEND compile_options "-DLIBC_TEST_SKIP_DEATH_TESTS")
+  # Set LIBC_TEST_SKIP_DEATH_TESTS to skip running tests that use EXPECT_DEATH
+  # and ASSERT_DEATH. On platforms where they work, they can be slow; on
+  # bare-metal platforms it might not be possible to implement them at all.
+  if(LIBC_TEST_SKIP_DEATH_TESTS)
----------------
labath wrote:

Yes, that is what I meant.

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


More information about the libc-commits mailing list