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) {
|
override fun configureTestTask(target: KotlinNativeTargetWithSimulatorTests, testTask: KotlinNativeSimulatorTest) {
|
||||||
super.configureTestTask(target, testTask)
|
super.configureTestTask(target, testTask)
|
||||||
|
if (Xcode != null) {
|
||||||
val deviceIdProvider = testTask.project.provider {
|
val deviceIdProvider = testTask.project.provider {
|
||||||
if (Xcode != null) {
|
|
||||||
Xcode.getDefaultTestDeviceId(target.konanTarget)
|
Xcode.getDefaultTestDeviceId(target.konanTarget)
|
||||||
?: error("Xcode does not support simulator tests for ${target.konanTarget.name}. Check that requested SDK is installed.")
|
?: 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(
|
override fun createTestRun(
|
||||||
|
|||||||
Reference in New Issue
Block a user