From 1074ac8725dea90db1bb67f055929ba5ead80497 Mon Sep 17 00:00:00 2001 From: mitras-git Date: Fri, 17 Jul 2026 10:07:02 -0400 Subject: [PATCH] remove xctest bundles and replace with add_library --- Tests/InMemoryLoggingTests/CMakeLists.txt | 14 +----- Tests/LoggingTests/CMakeLists.txt | 59 +++++++---------------- 2 files changed, 19 insertions(+), 54 deletions(-) diff --git a/Tests/InMemoryLoggingTests/CMakeLists.txt b/Tests/InMemoryLoggingTests/CMakeLists.txt index 3cca5fe..0a6b404 100644 --- a/Tests/InMemoryLoggingTests/CMakeLists.txt +++ b/Tests/InMemoryLoggingTests/CMakeLists.txt @@ -12,16 +12,8 @@ # #===----------------------------------------------------------------------===# -if(APPLE) - add_library(InMemoryLoggingTests MODULE - InMemoryLogHandlerTests.swift) - set_target_properties(InMemoryLoggingTests PROPERTIES - BUNDLE TRUE - BUNDLE_EXTENSION xctest) -else() - add_executable(InMemoryLoggingTests - InMemoryLogHandlerTests.swift) -endif() +add_library(InMemoryLoggingTests + InMemoryLogHandlerTests.swift) target_compile_options(InMemoryLoggingTests PRIVATE ${SWIFT_LOG_COMMON_COMPILE_OPTIONS}) @@ -39,5 +31,3 @@ if(APPLE) else() target_link_libraries(InMemoryLoggingTests PRIVATE InMemoryLogging Logging Testing) endif() - -add_test(NAME InMemoryLoggingTests COMMAND InMemoryLoggingTests) diff --git a/Tests/LoggingTests/CMakeLists.txt b/Tests/LoggingTests/CMakeLists.txt index 42ddf2f..2b812c0 100644 --- a/Tests/LoggingTests/CMakeLists.txt +++ b/Tests/LoggingTests/CMakeLists.txt @@ -12,46 +12,23 @@ # #===----------------------------------------------------------------------===# -if(APPLE) - add_library(LoggingTests MODULE - CompatibilityTest.swift - GlobalLoggingTest.swift - LocalLoggingTest.swift - LockTest.swift - LogEventTest.swift - LoggingTest.swift - MDCTest.swift - MetadataAttributesTest.swift - MetadataProviderTest.swift - MetadataValueInterpolationTest.swift - StreamLogHandlerTest.swift - SwiftLogNoOpLogHandlerTest.swift - TaskLocalLoggerTest.swift - TestLogger.swift - TestSendable.swift - SubDirectoryOfLoggingTests/EmitALogFromSubDirectory.swift) - set_target_properties(LoggingTests PROPERTIES - BUNDLE TRUE - BUNDLE_EXTENSION xctest) -else() - add_executable(LoggingTests - CompatibilityTest.swift - GlobalLoggingTest.swift - LocalLoggingTest.swift - LockTest.swift - LogEventTest.swift - LoggingTest.swift - MDCTest.swift - MetadataAttributesTest.swift - MetadataProviderTest.swift - MetadataValueInterpolationTest.swift - StreamLogHandlerTest.swift - SwiftLogNoOpLogHandlerTest.swift - TaskLocalLoggerTest.swift - TestLogger.swift - TestSendable.swift - SubDirectoryOfLoggingTests/EmitALogFromSubDirectory.swift) -endif() +add_library(LoggingTests + CompatibilityTest.swift + GlobalLoggingTest.swift + LocalLoggingTest.swift + LockTest.swift + LogEventTest.swift + LoggingTest.swift + MDCTest.swift + MetadataAttributesTest.swift + MetadataProviderTest.swift + MetadataValueInterpolationTest.swift + StreamLogHandlerTest.swift + SwiftLogNoOpLogHandlerTest.swift + TaskLocalLoggerTest.swift + TestLogger.swift + TestSendable.swift + SubDirectoryOfLoggingTests/EmitALogFromSubDirectory.swift) target_compile_options(LoggingTests PRIVATE ${SWIFT_LOG_COMMON_COMPILE_OPTIONS}) @@ -70,5 +47,3 @@ if(APPLE) else() target_link_libraries(LoggingTests PRIVATE Logging Testing) endif() - -add_test(NAME LoggingTests COMMAND LoggingTests)