diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bc5555933..d6f45545b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,7 +86,7 @@ jobs: platform: "tvOS Simulator,name=Apple TV,OS=26.0" runs-on: ${{ matrix.os }} - timeout-minutes: 30 + timeout-minutes: 35 defaults: run: shell: bash diff --git a/Tests/LKTestHost/Audio.xctestplan b/Tests/LKTestHost/Audio.xctestplan new file mode 100644 index 000000000..008a737dc --- /dev/null +++ b/Tests/LKTestHost/Audio.xctestplan @@ -0,0 +1,39 @@ +{ + "configurations" : [ + { + "id" : "059C7256-DC44-445F-881C-433C6BE17762", + "name" : "base", + "options" : { + + } + } + ], + "defaultOptions" : { + "environmentVariableEntries" : [ + { + "key" : "LIVEKIT_TESTING_URL", + "value" : "ws:\/\/localhost:7880" + }, + { + "key" : "LIVEKIT_TESTING_API_KEY", + "value" : "devkey" + }, + { + "key" : "LIVEKIT_TESTING_API_SECRET", + "value" : "secret" + } + ], + "testExecutionOrdering" : "random", + "testTimeoutsEnabled" : true + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:LKTestHost.xcodeproj", + "identifier" : "AC99ED5C2E95320700DD50B6", + "name" : "LiveKitAudioTests" + } + } + ], + "version" : 1 +} diff --git a/Tests/LKTestHost/Core.xctestplan b/Tests/LKTestHost/Core.xctestplan new file mode 100644 index 000000000..62d890993 --- /dev/null +++ b/Tests/LKTestHost/Core.xctestplan @@ -0,0 +1,39 @@ +{ + "configurations" : [ + { + "id" : "4083664C-CBD4-4DC9-A23B-AD78C697A794", + "name" : "base", + "options" : { + + } + } + ], + "defaultOptions" : { + "environmentVariableEntries" : [ + { + "key" : "LIVEKIT_TESTING_URL", + "value" : "ws:\/\/localhost:7880" + }, + { + "key" : "LIVEKIT_TESTING_API_KEY", + "value" : "devkey" + }, + { + "key" : "LIVEKIT_TESTING_API_SECRET", + "value" : "secret" + } + ], + "testExecutionOrdering" : "random", + "testTimeoutsEnabled" : true + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:LKTestHost.xcodeproj", + "identifier" : "7B7356772D9CB604003BB6F4", + "name" : "LiveKitCoreTests" + } + } + ], + "version" : 1 +} diff --git a/Tests/LKTestHost/LKTestHost.xcodeproj/project.pbxproj b/Tests/LKTestHost/LKTestHost.xcodeproj/project.pbxproj index 26e593a6d..d9d19b527 100644 --- a/Tests/LKTestHost/LKTestHost.xcodeproj/project.pbxproj +++ b/Tests/LKTestHost/LKTestHost.xcodeproj/project.pbxproj @@ -9,8 +9,12 @@ /* Begin PBXBuildFile section */ 7B7356972D9CB629003BB6F4 /* LiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7B7356962D9CB629003BB6F4 /* LiveKit */; }; 7B73570F2D9CB6B9003BB6F4 /* JWTKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7B73570E2D9CB6B9003BB6F4 /* JWTKit */; }; - 7BEF53122D9CD13100214147 /* TestPlan.xctestplan in Resources */ = {isa = PBXBuildFile; fileRef = 7BEF53112D9CD13100214147 /* TestPlan.xctestplan */; }; + 7BEF53122D9CD13100214147 /* Core.xctestplan in Resources */ = {isa = PBXBuildFile; fileRef = 7BEF53112D9CD13100214147 /* Core.xctestplan */; }; 7BF642E72D9CC1FE0058A1F7 /* LiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7BF642E62D9CC1FE0058A1F7 /* LiveKit */; }; + AC99ED652E95320700DD50B6 /* LiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = AC99ED622E95320700DD50B6 /* LiveKit */; }; + AC99ED662E95320700DD50B6 /* LiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = AC99ED5F2E95320700DD50B6 /* LiveKit */; }; + AC99ED672E95320700DD50B6 /* JWTKit in Frameworks */ = {isa = PBXBuildFile; productRef = AC99ED602E95320700DD50B6 /* JWTKit */; }; + AC99EE682E9532C700DD50B6 /* Audio.xctestplan in Resources */ = {isa = PBXBuildFile; fileRef = AC99EE672E9532C700DD50B6 /* Audio.xctestplan */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -21,12 +25,21 @@ remoteGlobalIDString = 7B7356692D9CB603003BB6F4; remoteInfo = LKTestHost; }; + AC99ED5E2E95320700DD50B6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B7356622D9CB603003BB6F4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7B7356692D9CB603003BB6F4; + remoteInfo = LKTestHost; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 7B73566A2D9CB603003BB6F4 /* LKTestHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LKTestHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 7B7356782D9CB604003BB6F4 /* LiveKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LiveKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 7BEF53112D9CD13100214147 /* TestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan.xctestplan; sourceTree = ""; }; + 7B7356782D9CB604003BB6F4 /* LiveKitCoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LiveKitCoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7BEF53112D9CD13100214147 /* Core.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Core.xctestplan; sourceTree = ""; }; + AC99ED6C2E95320700DD50B6 /* LiveKitAudioTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LiveKitAudioTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + AC99EE672E9532C700DD50B6 /* Audio.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Audio.xctestplan; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ @@ -48,11 +61,23 @@ path = LKTestHost; sourceTree = ""; }; - 7B73567B2D9CB604003BB6F4 /* LiveKitTests */ = { + AC99ECDC2E9530C700DD50B6 /* LiveKitAudioTests */ = { isa = PBXFileSystemSynchronizedRootGroup; - name = LiveKitTests; - path = ../LiveKitTests; - sourceTree = ""; + name = LiveKitAudioTests; + path = ../LiveKitAudioTests; + sourceTree = SOURCE_ROOT; + }; + AC99ED112E9530C700DD50B6 /* LiveKitCoreTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + name = LiveKitCoreTests; + path = ../LiveKitCoreTests; + sourceTree = SOURCE_ROOT; + }; + AC99ED532E95311100DD50B6 /* LiveKitTestSupport */ = { + isa = PBXFileSystemSynchronizedRootGroup; + name = LiveKitTestSupport; + path = ../LiveKitTestSupport; + sourceTree = SOURCE_ROOT; }; /* End PBXFileSystemSynchronizedRootGroup section */ @@ -74,15 +99,28 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + AC99ED642E95320700DD50B6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AC99ED652E95320700DD50B6 /* LiveKit in Frameworks */, + AC99ED662E95320700DD50B6 /* LiveKit in Frameworks */, + AC99ED672E95320700DD50B6 /* JWTKit in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 7B7356612D9CB603003BB6F4 = { isa = PBXGroup; children = ( - 7BEF53112D9CD13100214147 /* TestPlan.xctestplan */, + AC99EE672E9532C700DD50B6 /* Audio.xctestplan */, + 7BEF53112D9CD13100214147 /* Core.xctestplan */, 7B73566C2D9CB603003BB6F4 /* LKTestHost */, - 7B73567B2D9CB604003BB6F4 /* LiveKitTests */, + AC99ECDC2E9530C700DD50B6 /* LiveKitAudioTests */, + AC99ED112E9530C700DD50B6 /* LiveKitCoreTests */, + AC99ED532E95311100DD50B6 /* LiveKitTestSupport */, 7B73566B2D9CB603003BB6F4 /* Products */, ); sourceTree = ""; @@ -91,7 +129,8 @@ isa = PBXGroup; children = ( 7B73566A2D9CB603003BB6F4 /* LKTestHost.app */, - 7B7356782D9CB604003BB6F4 /* LiveKitTests.xctest */, + 7B7356782D9CB604003BB6F4 /* LiveKitCoreTests.xctest */, + AC99ED6C2E95320700DD50B6 /* LiveKitAudioTests.xctest */, ); name = Products; sourceTree = ""; @@ -121,9 +160,9 @@ productReference = 7B73566A2D9CB603003BB6F4 /* LKTestHost.app */; productType = "com.apple.product-type.application"; }; - 7B7356772D9CB604003BB6F4 /* LiveKitTests */ = { + 7B7356772D9CB604003BB6F4 /* LiveKitCoreTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 7B73568F2D9CB604003BB6F4 /* Build configuration list for PBXNativeTarget "LiveKitTests" */; + buildConfigurationList = 7B73568F2D9CB604003BB6F4 /* Build configuration list for PBXNativeTarget "LiveKitCoreTests" */; buildPhases = ( 7B7356742D9CB604003BB6F4 /* Sources */, 7B7356752D9CB604003BB6F4 /* Frameworks */, @@ -135,16 +174,44 @@ 7B73567A2D9CB604003BB6F4 /* PBXTargetDependency */, ); fileSystemSynchronizedGroups = ( - 7B73567B2D9CB604003BB6F4 /* LiveKitTests */, + AC99ED112E9530C700DD50B6 /* LiveKitCoreTests */, + AC99ED532E95311100DD50B6 /* LiveKitTestSupport */, ); - name = LiveKitTests; + name = LiveKitCoreTests; packageProductDependencies = ( 7B7356962D9CB629003BB6F4 /* LiveKit */, 7B73570E2D9CB6B9003BB6F4 /* JWTKit */, 7BF642E62D9CC1FE0058A1F7 /* LiveKit */, ); productName = LKTestHostTests; - productReference = 7B7356782D9CB604003BB6F4 /* LiveKitTests.xctest */; + productReference = 7B7356782D9CB604003BB6F4 /* LiveKitCoreTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + AC99ED5C2E95320700DD50B6 /* LiveKitAudioTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = AC99ED692E95320700DD50B6 /* Build configuration list for PBXNativeTarget "LiveKitAudioTests" */; + buildPhases = ( + AC99ED632E95320700DD50B6 /* Sources */, + AC99ED642E95320700DD50B6 /* Frameworks */, + AC99ED682E95320700DD50B6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + AC99ED5D2E95320700DD50B6 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + AC99ECDC2E9530C700DD50B6 /* LiveKitAudioTests */, + AC99ED532E95311100DD50B6 /* LiveKitTestSupport */, + ); + name = LiveKitAudioTests; + packageProductDependencies = ( + AC99ED5F2E95320700DD50B6 /* LiveKit */, + AC99ED602E95320700DD50B6 /* JWTKit */, + AC99ED622E95320700DD50B6 /* LiveKit */, + ); + productName = LKTestHostTests; + productReference = AC99ED6C2E95320700DD50B6 /* LiveKitAudioTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -185,7 +252,8 @@ projectRoot = ""; targets = ( 7B7356692D9CB603003BB6F4 /* LKTestHost */, - 7B7356772D9CB604003BB6F4 /* LiveKitTests */, + AC99ED5C2E95320700DD50B6 /* LiveKitAudioTests */, + 7B7356772D9CB604003BB6F4 /* LiveKitCoreTests */, ); }; /* End PBXProject section */ @@ -195,7 +263,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7BEF53122D9CD13100214147 /* TestPlan.xctestplan in Resources */, + AC99EE682E9532C700DD50B6 /* Audio.xctestplan in Resources */, + 7BEF53122D9CD13100214147 /* Core.xctestplan in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -206,6 +275,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + AC99ED682E95320700DD50B6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -223,6 +299,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + AC99ED632E95320700DD50B6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -231,6 +314,11 @@ target = 7B7356692D9CB603003BB6F4 /* LKTestHost */; targetProxy = 7B7356792D9CB604003BB6F4 /* PBXContainerItemProxy */; }; + AC99ED5D2E95320700DD50B6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7B7356692D9CB603003BB6F4 /* LKTestHost */; + targetProxy = AC99ED5E2E95320700DD50B6 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -486,6 +574,52 @@ }; name = Release; }; + AC99ED6A2E95320700DD50B6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 76TVFCUKK7; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.3; + MACOSX_DEPLOYMENT_TARGET = 15.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.livekit.client-sdk-swift.LKTestHostTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LKTestHost.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/LKTestHost"; + XROS_DEPLOYMENT_TARGET = 2.4; + }; + name = Debug; + }; + AC99ED6B2E95320700DD50B6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 76TVFCUKK7; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.3; + MACOSX_DEPLOYMENT_TARGET = 15.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.livekit.client-sdk-swift.LKTestHostTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LKTestHost.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/LKTestHost"; + XROS_DEPLOYMENT_TARGET = 2.4; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -507,7 +641,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7B73568F2D9CB604003BB6F4 /* Build configuration list for PBXNativeTarget "LiveKitTests" */ = { + 7B73568F2D9CB604003BB6F4 /* Build configuration list for PBXNativeTarget "LiveKitCoreTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 7B7356902D9CB604003BB6F4 /* Debug */, @@ -516,6 +650,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + AC99ED692E95320700DD50B6 /* Build configuration list for PBXNativeTarget "LiveKitAudioTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AC99ED6A2E95320700DD50B6 /* Debug */, + AC99ED6B2E95320700DD50B6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ @@ -534,6 +677,14 @@ minimumVersion = 4.13.4; }; }; + AC99ED612E95320700DD50B6 /* XCRemoteSwiftPackageReference "jwt-kit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/vapor/jwt-kit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.13.4; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -550,6 +701,19 @@ isa = XCSwiftPackageProductDependency; productName = LiveKit; }; + AC99ED5F2E95320700DD50B6 /* LiveKit */ = { + isa = XCSwiftPackageProductDependency; + productName = LiveKit; + }; + AC99ED602E95320700DD50B6 /* JWTKit */ = { + isa = XCSwiftPackageProductDependency; + package = AC99ED612E95320700DD50B6 /* XCRemoteSwiftPackageReference "jwt-kit" */; + productName = JWTKit; + }; + AC99ED622E95320700DD50B6 /* LiveKit */ = { + isa = XCSwiftPackageProductDependency; + productName = LiveKit; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 7B7356622D9CB603003BB6F4 /* Project object */; diff --git a/Tests/LKTestHost/TestPlan.xctestplan b/Tests/LKTestHost/TestPlan.xctestplan deleted file mode 100644 index 77737cbea..000000000 --- a/Tests/LKTestHost/TestPlan.xctestplan +++ /dev/null @@ -1,24 +0,0 @@ -{ - "configurations" : [ - { - "id" : "4083664C-CBD4-4DC9-A23B-AD78C697A794", - "name" : "Configuration 1", - "options" : { - - } - } - ], - "defaultOptions" : { - "testTimeoutsEnabled" : true - }, - "testTargets" : [ - { - "target" : { - "containerPath" : "container:LKTestHost.xcodeproj", - "identifier" : "7B7356772D9CB604003BB6F4", - "name" : "LiveKitTests" - } - } - ], - "version" : 1 -} diff --git a/Tests/LiveKitAudioTests/AudioEngineAvailability.swift b/Tests/LiveKitAudioTests/AudioEngineAvailability.swift index fb324d874..618a2adab 100644 --- a/Tests/LiveKitAudioTests/AudioEngineAvailability.swift +++ b/Tests/LiveKitAudioTests/AudioEngineAvailability.swift @@ -16,7 +16,9 @@ @preconcurrency import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AudioEngineAvailabilityTests: LKTestCase { // Check if audio engine will stop when availability is set to .none, diff --git a/Tests/LiveKitAudioTests/AudioEngineObserver.swift b/Tests/LiveKitAudioTests/AudioEngineObserver.swift index e6f7dbdb9..b1c2e68d9 100644 --- a/Tests/LiveKitAudioTests/AudioEngineObserver.swift +++ b/Tests/LiveKitAudioTests/AudioEngineObserver.swift @@ -16,7 +16,9 @@ @preconcurrency import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif final class TestEngineObserver: AudioEngineObserver, @unchecked Sendable { var next: (any LiveKit.AudioEngineObserver)? diff --git a/Tests/LiveKitAudioTests/AudioEnginePermission.swift b/Tests/LiveKitAudioTests/AudioEnginePermission.swift index d0f50de5a..5a35ffb01 100644 --- a/Tests/LiveKitAudioTests/AudioEnginePermission.swift +++ b/Tests/LiveKitAudioTests/AudioEnginePermission.swift @@ -16,7 +16,9 @@ @preconcurrency import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AudioEnginePermissionTests: LKTestCase { #if os(iOS) || os(visionOS) || os(tvOS) diff --git a/Tests/LiveKitAudioTests/AudioEngineTests.swift b/Tests/LiveKitAudioTests/AudioEngineTests.swift index 62f939e02..cfee93077 100644 --- a/Tests/LiveKitAudioTests/AudioEngineTests.swift +++ b/Tests/LiveKitAudioTests/AudioEngineTests.swift @@ -16,7 +16,9 @@ @preconcurrency import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import LiveKitWebRTC import LKObjCHelpers diff --git a/Tests/LiveKitAudioTests/AudioManagerTests.swift b/Tests/LiveKitAudioTests/AudioManagerTests.swift index 957061d21..2f8dd3cd2 100644 --- a/Tests/LiveKitAudioTests/AudioManagerTests.swift +++ b/Tests/LiveKitAudioTests/AudioManagerTests.swift @@ -16,7 +16,9 @@ @preconcurrency import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import LiveKitWebRTC class AudioManagerTests: LKTestCase { diff --git a/Tests/LiveKitAudioTests/AudioProcessingTests.swift b/Tests/LiveKitAudioTests/AudioProcessingTests.swift index e29b209c3..c7502fc9c 100644 --- a/Tests/LiveKitAudioTests/AudioProcessingTests.swift +++ b/Tests/LiveKitAudioTests/AudioProcessingTests.swift @@ -20,7 +20,9 @@ import Foundation import LiveKitWebRTC @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AudioProcessingTests: LKTestCase, AudioCustomProcessingDelegate, @unchecked Sendable { var _initSampleRate: Double = 0.0 diff --git a/Tests/LiveKitAudioTests/DeviceManager.swift b/Tests/LiveKitAudioTests/DeviceManager.swift index 6f7765a90..5d463abf8 100644 --- a/Tests/LiveKitAudioTests/DeviceManager.swift +++ b/Tests/LiveKitAudioTests/DeviceManager.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class DeviceManagerTests: LKTestCase { func testListDevices() async throws { diff --git a/Tests/LiveKitAudioTests/LocalAudioTrackRecorderTests.swift b/Tests/LiveKitAudioTests/LocalAudioTrackRecorderTests.swift index c29156db1..d4980304c 100644 --- a/Tests/LiveKitAudioTests/LocalAudioTrackRecorderTests.swift +++ b/Tests/LiveKitAudioTests/LocalAudioTrackRecorderTests.swift @@ -16,7 +16,9 @@ import AVFAudio @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class LocalAudioTrackRecorderTests: LKTestCase { func testRecording() async throws { diff --git a/Tests/LiveKitAudioTests/MuteTests.swift b/Tests/LiveKitAudioTests/MuteTests.swift index 245f2fb6c..86b6c4078 100644 --- a/Tests/LiveKitAudioTests/MuteTests.swift +++ b/Tests/LiveKitAudioTests/MuteTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import LiveKitWebRTC struct TestEngineTransition { diff --git a/Tests/LiveKitAudioTests/PreConnectAudioBufferTests.swift b/Tests/LiveKitAudioTests/PreConnectAudioBufferTests.swift index ede2c83e0..3a28bf3cc 100644 --- a/Tests/LiveKitAudioTests/PreConnectAudioBufferTests.swift +++ b/Tests/LiveKitAudioTests/PreConnectAudioBufferTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class PreConnectAudioBufferTests: LKTestCase { func testParticipantActiveStateSendsAudioData() async throws { diff --git a/Tests/LiveKitAudioTests/PublishDeviceOptimization.swift b/Tests/LiveKitAudioTests/PublishDeviceOptimization.swift index b1220aae0..895658177 100644 --- a/Tests/LiveKitAudioTests/PublishDeviceOptimization.swift +++ b/Tests/LiveKitAudioTests/PublishDeviceOptimization.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class PublishDeviceOptimizationTests: LKTestCase { // For testing remote server: diff --git a/Tests/LiveKitAudioTests/PublishMicrophoneTests.swift b/Tests/LiveKitAudioTests/PublishMicrophoneTests.swift index b8632b535..2f4822f68 100644 --- a/Tests/LiveKitAudioTests/PublishMicrophoneTests.swift +++ b/Tests/LiveKitAudioTests/PublishMicrophoneTests.swift @@ -17,7 +17,9 @@ import Combine import CoreMedia @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class PublishMicrophoneTests: LKTestCase { func testConcurrentMicPublish() async throws { diff --git a/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMBufferTests.swift b/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMBufferTests.swift index 2f9d98463..3dd280fca 100644 --- a/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMBufferTests.swift +++ b/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMBufferTests.swift @@ -16,7 +16,9 @@ import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AVAudioPCMBufferTests: LKTestCase { func testResample() { diff --git a/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMRingBufferTests.swift b/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMRingBufferTests.swift index 1ff1c96d0..599076ca3 100644 --- a/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMRingBufferTests.swift +++ b/Tests/LiveKitCoreTests/AVFoundation/AVAudioPCMRingBufferTests.swift @@ -16,7 +16,9 @@ import AVFAudio @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif #if os(iOS) && targetEnvironment(macCatalyst) // Required for UnsafeMutableAudioBufferListPointer. diff --git a/Tests/LiveKitCoreTests/AVFoundation/AudioConverterTests.swift b/Tests/LiveKitCoreTests/AVFoundation/AudioConverterTests.swift index 784987c5b..1b23ba0b1 100644 --- a/Tests/LiveKitCoreTests/AVFoundation/AudioConverterTests.swift +++ b/Tests/LiveKitCoreTests/AVFoundation/AudioConverterTests.swift @@ -16,7 +16,9 @@ import AVFAudio @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AudioConverterTests: LKTestCase { func testConvertFormat() async throws { diff --git a/Tests/LiveKitCoreTests/AVFoundation/AudioMixRecorderTests.swift b/Tests/LiveKitCoreTests/AVFoundation/AudioMixRecorderTests.swift index 329518a79..8e008bc74 100644 --- a/Tests/LiveKitCoreTests/AVFoundation/AudioMixRecorderTests.swift +++ b/Tests/LiveKitCoreTests/AVFoundation/AudioMixRecorderTests.swift @@ -16,7 +16,9 @@ import AVFAudio import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif final class AudioMixRecorderTests: LKTestCase { let audioSettings16k: [String: Any] = [ diff --git a/Tests/LiveKitCoreTests/AsyncFileStreamTests.swift b/Tests/LiveKitCoreTests/AsyncFileStreamTests.swift index 34616e792..c1e053a13 100644 --- a/Tests/LiveKitCoreTests/AsyncFileStreamTests.swift +++ b/Tests/LiveKitCoreTests/AsyncFileStreamTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AsyncFileStreamTests: LKTestCase { private let testBuffer = generateTestBuffer( diff --git a/Tests/LiveKitCoreTests/AsyncRetryTests.swift b/Tests/LiveKitCoreTests/AsyncRetryTests.swift index 718f2da5b..a08ac58ef 100644 --- a/Tests/LiveKitCoreTests/AsyncRetryTests.swift +++ b/Tests/LiveKitCoreTests/AsyncRetryTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class AsyncRetryTests: LKTestCase { override func setUpWithError() throws {} diff --git a/Tests/LiveKitCoreTests/Broadcast/BroadcastAudioCodecTests.swift b/Tests/LiveKitCoreTests/Broadcast/BroadcastAudioCodecTests.swift index 9ccd50ace..6e9b89b1e 100644 --- a/Tests/LiveKitCoreTests/Broadcast/BroadcastAudioCodecTests.swift +++ b/Tests/LiveKitCoreTests/Broadcast/BroadcastAudioCodecTests.swift @@ -19,7 +19,9 @@ import AVFAudio import CoreMedia @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif final class BroadcastAudioCodecTests: XCTestCase { private var codec: BroadcastAudioCodec! diff --git a/Tests/LiveKitCoreTests/Broadcast/BroadcastImageCodecTests.swift b/Tests/LiveKitCoreTests/Broadcast/BroadcastImageCodecTests.swift index 986ec1911..bd56304c7 100644 --- a/Tests/LiveKitCoreTests/Broadcast/BroadcastImageCodecTests.swift +++ b/Tests/LiveKitCoreTests/Broadcast/BroadcastImageCodecTests.swift @@ -17,7 +17,9 @@ #if os(iOS) @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif final class BroadcastImageCodecTests: LKTestCase { private var codec: BroadcastImageCodec! diff --git a/Tests/LiveKitCoreTests/Broadcast/IPCChannelTests.swift b/Tests/LiveKitCoreTests/Broadcast/IPCChannelTests.swift index 7c93f0cee..f3b68aa94 100644 --- a/Tests/LiveKitCoreTests/Broadcast/IPCChannelTests.swift +++ b/Tests/LiveKitCoreTests/Broadcast/IPCChannelTests.swift @@ -17,7 +17,9 @@ #if os(iOS) @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import Network final class IPCChannelTests: LKTestCase, @unchecked Sendable { diff --git a/Tests/LiveKitCoreTests/Broadcast/SocketPathTests.swift b/Tests/LiveKitCoreTests/Broadcast/SocketPathTests.swift index 8eda2a8c2..4308ca4b7 100644 --- a/Tests/LiveKitCoreTests/Broadcast/SocketPathTests.swift +++ b/Tests/LiveKitCoreTests/Broadcast/SocketPathTests.swift @@ -17,7 +17,9 @@ #if os(iOS) @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif final class SocketPathTests: LKTestCase { func testValid() throws { diff --git a/Tests/LiveKitCoreTests/BroadcastManagerTests.swift b/Tests/LiveKitCoreTests/BroadcastManagerTests.swift index cd15436f5..777bc430c 100644 --- a/Tests/LiveKitCoreTests/BroadcastManagerTests.swift +++ b/Tests/LiveKitCoreTests/BroadcastManagerTests.swift @@ -18,7 +18,9 @@ import Combine @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class BroadcastManagerTests: LKTestCase, @unchecked Sendable { private var manager: BroadcastManager! diff --git a/Tests/LiveKitCoreTests/CodecTests.swift b/Tests/LiveKitCoreTests/CodecTests.swift index fea90cbb7..11e81c883 100644 --- a/Tests/LiveKitCoreTests/CodecTests.swift +++ b/Tests/LiveKitCoreTests/CodecTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class CodecTests: LKTestCase { func testParseCodec() throws { diff --git a/Tests/LiveKitCoreTests/CompleterTests.swift b/Tests/LiveKitCoreTests/CompleterTests.swift index 63ebf6083..58102011f 100644 --- a/Tests/LiveKitCoreTests/CompleterTests.swift +++ b/Tests/LiveKitCoreTests/CompleterTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class CompleterTests: LKTestCase { override func setUpWithError() throws {} diff --git a/Tests/LiveKitCoreTests/DarwinNotificationCenterTests.swift b/Tests/LiveKitCoreTests/DarwinNotificationCenterTests.swift index bb739acbc..8d1eafb64 100644 --- a/Tests/LiveKitCoreTests/DarwinNotificationCenterTests.swift +++ b/Tests/LiveKitCoreTests/DarwinNotificationCenterTests.swift @@ -16,7 +16,9 @@ import Combine @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class DarwinNotificationCenterTests: LKTestCase { func testPublisher() throws { diff --git a/Tests/LiveKitCoreTests/DataChannel/EncryptedDataChannelTests.swift b/Tests/LiveKitCoreTests/DataChannel/EncryptedDataChannelTests.swift index eef365369..210244a40 100644 --- a/Tests/LiveKitCoreTests/DataChannel/EncryptedDataChannelTests.swift +++ b/Tests/LiveKitCoreTests/DataChannel/EncryptedDataChannelTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import LiveKitWebRTC class EncryptedDataChannelTests: LKTestCase, @unchecked Sendable { diff --git a/Tests/LiveKitCoreTests/DataChannel/RealiableDataChannelTests.swift b/Tests/LiveKitCoreTests/DataChannel/RealiableDataChannelTests.swift index 8f1ef7eac..4671dbd85 100644 --- a/Tests/LiveKitCoreTests/DataChannel/RealiableDataChannelTests.swift +++ b/Tests/LiveKitCoreTests/DataChannel/RealiableDataChannelTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class RealiableDataChannelTests: LKTestCase, @unchecked Sendable { var receivedExpectation: XCTestExpectation! diff --git a/Tests/LiveKitCoreTests/DataStream/ByteStreamInfoTests.swift b/Tests/LiveKitCoreTests/DataStream/ByteStreamInfoTests.swift index 4450f0d6b..b7e9d0f47 100644 --- a/Tests/LiveKitCoreTests/DataStream/ByteStreamInfoTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/ByteStreamInfoTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class ByteStreamInfoTests: LKTestCase { func testProtocolTypeConversion() { diff --git a/Tests/LiveKitCoreTests/DataStream/ByteStreamReaderTests.swift b/Tests/LiveKitCoreTests/DataStream/ByteStreamReaderTests.swift index e15ddeda6..c49585cf8 100644 --- a/Tests/LiveKitCoreTests/DataStream/ByteStreamReaderTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/ByteStreamReaderTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class ByteStreamReaderTests: LKTestCase, @unchecked Sendable { private var continuation: StreamReaderSource.Continuation! diff --git a/Tests/LiveKitCoreTests/DataStream/DataStreamTests.swift b/Tests/LiveKitCoreTests/DataStream/DataStreamTests.swift index ef48bbb81..df65e717c 100644 --- a/Tests/LiveKitCoreTests/DataStream/DataStreamTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/DataStreamTests.swift @@ -15,7 +15,9 @@ */ import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class DataStreamTests: LKTestCase { private enum Method { diff --git a/Tests/LiveKitCoreTests/DataStream/FileInfoTests.swift b/Tests/LiveKitCoreTests/DataStream/FileInfoTests.swift index 5f8f704ed..d53741cef 100644 --- a/Tests/LiveKitCoreTests/DataStream/FileInfoTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/FileInfoTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class FileInfoTests: LKTestCase { func testReadInfo() throws { diff --git a/Tests/LiveKitCoreTests/DataStream/IncomingStreamManagerTests.swift b/Tests/LiveKitCoreTests/DataStream/IncomingStreamManagerTests.swift index eb080292c..ba4390524 100644 --- a/Tests/LiveKitCoreTests/DataStream/IncomingStreamManagerTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/IncomingStreamManagerTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class IncomingStreamManagerTests: LKTestCase, @unchecked Sendable { private var manager: IncomingStreamManager! diff --git a/Tests/LiveKitCoreTests/DataStream/OutgoingStreamManagerTests.swift b/Tests/LiveKitCoreTests/DataStream/OutgoingStreamManagerTests.swift index c69a89e70..4f5ab78f3 100644 --- a/Tests/LiveKitCoreTests/DataStream/OutgoingStreamManagerTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/OutgoingStreamManagerTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class OutgoingStreamManagerTests: LKTestCase { func testStreamBytes() async throws { diff --git a/Tests/LiveKitCoreTests/DataStream/StreamDataTests.swift b/Tests/LiveKitCoreTests/DataStream/StreamDataTests.swift index 4f3f3b9ee..10f0a45fc 100644 --- a/Tests/LiveKitCoreTests/DataStream/StreamDataTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/StreamDataTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class StreamDataTests: LKTestCase { // MARK: - Data chunking diff --git a/Tests/LiveKitCoreTests/DataStream/TextStreamInfoTests.swift b/Tests/LiveKitCoreTests/DataStream/TextStreamInfoTests.swift index d0a09b292..094e8560a 100644 --- a/Tests/LiveKitCoreTests/DataStream/TextStreamInfoTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/TextStreamInfoTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class TextStreamInfoTests: LKTestCase { func testProtocolTypeConversion() { diff --git a/Tests/LiveKitCoreTests/DataStream/TextStreamReaderTests.swift b/Tests/LiveKitCoreTests/DataStream/TextStreamReaderTests.swift index 668d5894e..2f5a0ec9a 100644 --- a/Tests/LiveKitCoreTests/DataStream/TextStreamReaderTests.swift +++ b/Tests/LiveKitCoreTests/DataStream/TextStreamReaderTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class TextStreamReaderTests: LKTestCase, @unchecked Sendable { private var continuation: StreamReaderSource.Continuation! diff --git a/Tests/LiveKitCoreTests/E2EE/Thread.swift b/Tests/LiveKitCoreTests/E2EE/Thread.swift index d8e1be2c0..7bd4d70ed 100644 --- a/Tests/LiveKitCoreTests/E2EE/Thread.swift +++ b/Tests/LiveKitCoreTests/E2EE/Thread.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif @preconcurrency import LiveKitWebRTC class E2EEThreadTests: LKTestCase { diff --git a/Tests/LiveKitCoreTests/Extensions/StringTests.swift b/Tests/LiveKitCoreTests/Extensions/StringTests.swift index ba2f442de..bdfc63008 100644 --- a/Tests/LiveKitCoreTests/Extensions/StringTests.swift +++ b/Tests/LiveKitCoreTests/Extensions/StringTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif final class StringTests: LKTestCase { func testByteLength() { diff --git a/Tests/LiveKitCoreTests/FunctionTests.swift b/Tests/LiveKitCoreTests/FunctionTests.swift index e2bfe9c34..b9c8f8a13 100644 --- a/Tests/LiveKitCoreTests/FunctionTests.swift +++ b/Tests/LiveKitCoreTests/FunctionTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class FunctionTests: LKTestCase { func testRangeMerge() async throws { diff --git a/Tests/LiveKitCoreTests/ObjCHelpersTests.swift b/Tests/LiveKitCoreTests/ObjCHelpersTests.swift index 109875ad0..5105b6043 100644 --- a/Tests/LiveKitCoreTests/ObjCHelpersTests.swift +++ b/Tests/LiveKitCoreTests/ObjCHelpersTests.swift @@ -14,7 +14,9 @@ * limitations under the License. */ +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif import LKObjCHelpers class ObjCHelperTests: LKTestCase { diff --git a/Tests/LiveKitCoreTests/Participant/RemoteParticipantTests.swift b/Tests/LiveKitCoreTests/Participant/RemoteParticipantTests.swift index baa422ef0..9acffdf45 100644 --- a/Tests/LiveKitCoreTests/Participant/RemoteParticipantTests.swift +++ b/Tests/LiveKitCoreTests/Participant/RemoteParticipantTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif // swiftformat:disable hoistAwait class RemoteParticipantTests: LKTestCase { diff --git a/Tests/LiveKitCoreTests/ParticipantTests.swift b/Tests/LiveKitCoreTests/ParticipantTests.swift index f4dc73347..ea067ea5e 100644 --- a/Tests/LiveKitCoreTests/ParticipantTests.swift +++ b/Tests/LiveKitCoreTests/ParticipantTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class ParticipantTests: LKTestCase { func testLocalParticipantIdentity() async throws { diff --git a/Tests/LiveKitCoreTests/PublishBufferCapturerTests.swift b/Tests/LiveKitCoreTests/PublishBufferCapturerTests.swift index 0b839e9ee..40eef943e 100644 --- a/Tests/LiveKitCoreTests/PublishBufferCapturerTests.swift +++ b/Tests/LiveKitCoreTests/PublishBufferCapturerTests.swift @@ -16,7 +16,9 @@ import AVFoundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class PublishBufferCapturerTests: LKTestCase { func testPublishBufferTrack() async throws { diff --git a/Tests/LiveKitCoreTests/PublishDataTests.swift b/Tests/LiveKitCoreTests/PublishDataTests.swift index bde0aba6c..58c5205dd 100644 --- a/Tests/LiveKitCoreTests/PublishDataTests.swift +++ b/Tests/LiveKitCoreTests/PublishDataTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class PublishDataTests: LKTestCase { // Test with canSubscribe: true diff --git a/Tests/LiveKitCoreTests/PublishTrackTests.swift b/Tests/LiveKitCoreTests/PublishTrackTests.swift index 4f2807000..f85dde6a3 100644 --- a/Tests/LiveKitCoreTests/PublishTrackTests.swift +++ b/Tests/LiveKitCoreTests/PublishTrackTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class PublishTrackTests: LKTestCase { func testPublishWithoutPermissions() async throws { diff --git a/Tests/LiveKitCoreTests/QueueActorTests.swift b/Tests/LiveKitCoreTests/QueueActorTests.swift index 645a5f310..5b8febfbe 100644 --- a/Tests/LiveKitCoreTests/QueueActorTests.swift +++ b/Tests/LiveKitCoreTests/QueueActorTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class QueueActorTests: LKTestCase { private lazy var queue = QueueActor { print($0) } diff --git a/Tests/LiveKitCoreTests/Room/RoomTests.swift b/Tests/LiveKitCoreTests/Room/RoomTests.swift index 6fe88b328..48eb311b9 100644 --- a/Tests/LiveKitCoreTests/Room/RoomTests.swift +++ b/Tests/LiveKitCoreTests/Room/RoomTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class RoomTests: LKTestCase, @unchecked Sendable { func testRoomProperties() async throws { diff --git a/Tests/LiveKitCoreTests/RpcTests.swift b/Tests/LiveKitCoreTests/RpcTests.swift index 1bd45103b..3b5a12865 100644 --- a/Tests/LiveKitCoreTests/RpcTests.swift +++ b/Tests/LiveKitCoreTests/RpcTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class RpcTests: LKTestCase { // Test performing RPC calls and verifying outgoing packets diff --git a/Tests/LiveKitCoreTests/SDKTests.swift b/Tests/LiveKitCoreTests/SDKTests.swift index efd2c7146..eafef7303 100644 --- a/Tests/LiveKitCoreTests/SDKTests.swift +++ b/Tests/LiveKitCoreTests/SDKTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class SDKTests: LKTestCase { func testReadVersion() { diff --git a/Tests/LiveKitCoreTests/SerialRunnerActor.swift b/Tests/LiveKitCoreTests/SerialRunnerActor.swift index 0bc130945..13a5b3426 100644 --- a/Tests/LiveKitCoreTests/SerialRunnerActor.swift +++ b/Tests/LiveKitCoreTests/SerialRunnerActor.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class SerialRunnerActorTests: LKTestCase, @unchecked Sendable { let serialRunner = SerialRunnerActor() diff --git a/Tests/LiveKitCoreTests/TTLDictionaryTests.swift b/Tests/LiveKitCoreTests/TTLDictionaryTests.swift index a5ed9cd99..d2b9390c7 100644 --- a/Tests/LiveKitCoreTests/TTLDictionaryTests.swift +++ b/Tests/LiveKitCoreTests/TTLDictionaryTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif // swiftformat:disable preferForLoop class TTLDictionaryTests: LKTestCase { diff --git a/Tests/LiveKitCoreTests/ThreadSafetyTests.swift b/Tests/LiveKitCoreTests/ThreadSafetyTests.swift index f88881640..c0050032e 100644 --- a/Tests/LiveKitCoreTests/ThreadSafetyTests.swift +++ b/Tests/LiveKitCoreTests/ThreadSafetyTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class ThreadSafetyTests: LKTestCase, @unchecked Sendable { struct TestState: Equatable { diff --git a/Tests/LiveKitCoreTests/TimeIntervalTests.swift b/Tests/LiveKitCoreTests/TimeIntervalTests.swift index e8e1a7292..ebeba6a3b 100644 --- a/Tests/LiveKitCoreTests/TimeIntervalTests.swift +++ b/Tests/LiveKitCoreTests/TimeIntervalTests.swift @@ -15,7 +15,9 @@ */ @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class TimeIntervalTests: LKTestCase { /// Tests that the reconnection delay computation follows the expected easeOutCirc pattern: diff --git a/Tests/LiveKitCoreTests/Track/TrackTests.swift b/Tests/LiveKitCoreTests/Track/TrackTests.swift index 8ef3e330f..84042b878 100644 --- a/Tests/LiveKitCoreTests/Track/TrackTests.swift +++ b/Tests/LiveKitCoreTests/Track/TrackTests.swift @@ -18,7 +18,9 @@ import AVFoundation import Foundation @testable import LiveKit +#if canImport(LiveKitTestSupport) import LiveKitTestSupport +#endif class TestTrack: LocalAudioTrack, @unchecked Sendable { init() {