Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions client/ios/A2UI-ExampleUITests/A2UI_ExampleUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.
//

import Foundation
import XCTest

/// UI test suite for the A2UI iOS sample application.
Expand All @@ -23,6 +24,15 @@ final class A2UIExampleUITests: XCTestCase {

override func setUpWithError() throws {
continueAfterFailure = false
// XCUIApplication runs in a separate process and does not inherit the test
// runner's environment. Forward LLVM_PROFILE_FILE with continuous sync (%c)
// so coverage counters are persisted even when XCTest terminates the app.
if let profileFile = ProcessInfo.processInfo.environment["LLVM_PROFILE_FILE"],
!profileFile.isEmpty
{
app.launchEnvironment["LLVM_PROFILE_FILE"] =
profileFile.contains("%c") ? profileFile : "\(profileFile)%c"
}
}

override func tearDownWithError() throws {
Expand All @@ -31,6 +41,7 @@ final class A2UIExampleUITests: XCTestCase {
if XCUIDevice.shared.orientation != .portrait {
XCUIDevice.shared.orientation = .portrait
}
app.terminate()
}

// =========================================================================
Expand Down
Loading