mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
splitting runtime sim version from the os version
This commit is contained in:
@@ -21,7 +21,11 @@ struct RunTests: AsyncParsableCommand {
|
||||
var device = "iPhone 17"
|
||||
|
||||
@Option(help: "The iOS version to use for the simulator runtime (e.g. '26.4').")
|
||||
var osVersion = "26.4"
|
||||
var osVersion = "26.4.1"
|
||||
|
||||
var runtime: String {
|
||||
osVersion.split(separator: ".").prefix(2).joined(separator: ".")
|
||||
}
|
||||
|
||||
@Option(help: "Number of times to retry failed tests. Only the failing tests are re-run, not the entire suite.")
|
||||
var retries = 0
|
||||
@@ -48,7 +52,7 @@ struct RunTests: AsyncParsableCommand {
|
||||
}
|
||||
|
||||
private var simulatorRuntime: String {
|
||||
"com.apple.CoreSimulator.SimRuntime.iOS-\(osVersion.replacingOccurrences(of: ".", with: "-"))"
|
||||
"com.apple.CoreSimulator.SimRuntime.iOS-\(runtime.replacingOccurrences(of: ".", with: "-"))"
|
||||
}
|
||||
|
||||
func run() async throws {
|
||||
@@ -81,9 +85,9 @@ struct RunTests: AsyncParsableCommand {
|
||||
private func createSimulatorIfNecessary(name: String, type: String) async throws {
|
||||
logger.info("Checking for simulator '\(name)'…")
|
||||
|
||||
guard let simulators = try await CI.run(.path("/bin/zsh"), ["-cu", "xcrun simctl list devices \"iOS \(osVersion)\" available"],
|
||||
guard let simulators = try await CI.run(.path("/bin/zsh"), ["-cu", "xcrun simctl list devices \"iOS \(runtime)\" available"],
|
||||
output: .string(limit: 4096)).standardOutput else {
|
||||
logger.info("No simulators found for iOS \(osVersion). Creating '\(name)'…")
|
||||
logger.info("No simulators found for iOS \(runtime). Creating '\(name)'…")
|
||||
try await createSimulator(name: name, type: type)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user