Set Xcode test device ID only if Xcode is available.
This commit is contained in:
committed by
Space Team
parent
0ffb370579
commit
c83286ef7e
+3
-6
@@ -669,16 +669,13 @@ class KotlinNativeTargetWithSimulatorTestsConfigurator :
|
||||
|
||||
override fun configureTestTask(target: KotlinNativeTargetWithSimulatorTests, testTask: KotlinNativeSimulatorTest) {
|
||||
super.configureTestTask(target, testTask)
|
||||
|
||||
val deviceIdProvider = testTask.project.provider {
|
||||
if (Xcode != null) {
|
||||
if (Xcode != null) {
|
||||
val deviceIdProvider = testTask.project.provider {
|
||||
Xcode.getDefaultTestDeviceId(target.konanTarget)
|
||||
?: error("Xcode does not support simulator tests for ${target.konanTarget.name}. Check that requested SDK is installed.")
|
||||
} else {
|
||||
error("Xcode is not found.")
|
||||
}
|
||||
testTask.device.set(deviceIdProvider)
|
||||
}
|
||||
testTask.device.set(deviceIdProvider)
|
||||
}
|
||||
|
||||
override fun createTestRun(
|
||||
|
||||
Reference in New Issue
Block a user