Skip to content

Commit

Permalink
Disabling tests here so they only run in macOS builds, not iOS builds (
Browse files Browse the repository at this point in the history
…#27534)

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Nov 3, 2023
1 parent 9fffc93 commit 1068426
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/darwin/Framework/CHIPTests/MTROTAProviderTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
// system dependencies
#import <XCTest/XCTest.h>

#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.
Expand Down Expand Up @@ -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:@[
Expand All @@ -358,6 +365,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath
XCTAssertNil(launchError);
[task waitUntilExit];
XCTAssertEqual([task terminationStatus], 0);
#endif

NSData * updateToken = [sOTAProviderDelegate generateUpdateToken];

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -890,4 +900,6 @@ - (void)test999_TearDown
[[self class] shutdownStack];
}

#endif

@end

0 comments on commit 1068426

Please sign in to comment.