diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m index 0b84c225c44c28..22f7ff6d5571fe 100644 --- a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -26,6 +26,12 @@ // system dependencies #import +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +#define ENABLE_OTA_TESTS 0 +#else +#define ENABLE_OTA_TESTS 1 +#endif + // TODO: Disable test005_DoBDXTransferAllowUpdateRequest until PR #26040 is merged. // Currently the poll interval causes delays in the BDX transfer and // results in the test taking a long time. @@ -347,6 +353,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath NSString * imageToolPath = [NSString pathWithComponents:@[ [pwd substringToIndex:(pwd.length - @"darwin/Framework".length)], @"app", @"ota_image_tool.py" ]]; +#if ENABLE_OTA_TESTS NSTask * task = [[NSTask alloc] init]; [task setLaunchPath:imageToolPath]; [task setArguments:@[ @@ -358,6 +365,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertNil(launchError); [task waitUntilExit]; XCTAssertEqual([task terminationStatus], 0); +#endif NSData * updateToken = [sOTAProviderDelegate generateUpdateToken]; @@ -592,6 +600,8 @@ + (void)shutdownStack [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; } +#if ENABLE_OTA_TESTS + - (void)test000_SetUp { // Nothing to do here; our setUp method handled this already. This test @@ -890,4 +900,6 @@ - (void)test999_TearDown [[self class] shutdownStack]; } +#endif + @end