Skip to content

Commit 2068911

Browse files
bzbarsky-applepull[bot]
authored andcommitted
Fix darwin test build when ENABLE_OTA_TESTS == 0. (#28959)
1 parent c8829c6 commit 2068911

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/darwin/Framework/CHIPTests/MTROTAProviderTests.m

+11-7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#undef ENABLE_REAL_OTA_UPDATE_TESTS
4242
#endif
4343

44+
#if ENABLE_OTA_TESTS
45+
4446
static const uint16_t kPairingTimeoutInSeconds = 10;
4547
static const uint16_t kTimeoutInSeconds = 3;
4648
static const uint16_t kTimeoutWithUpdateInSeconds = 60;
@@ -78,15 +80,12 @@
7880
@class MTROTARequestorAppRunner;
7981

8082
@interface MTROTAProviderTests : XCTestCase
81-
#if ENABLE_OTA_TESTS
8283
- (NSTask *)createTaskForPath:(NSString *)path;
8384
- (NSString *)createImageFromRawImage:(NSString *)rawImage withVersion:(NSNumber *)version;
8485
- (MTRDevice *)commissionDeviceWithPayload:(NSString *)payloadString nodeID:(NSNumber *)nodeID;
8586
- (void)registerRunningRequestor:(MTROTARequestorAppRunner *)requestor;
86-
#endif // ENABLE_OTA_TESTS
8787
@end
8888

89-
#if ENABLE_OTA_TESTS
9089
static unsigned sAppRunnerIndex = 1;
9190

9291
@interface MTROTARequestorAppRunner : NSObject
@@ -173,7 +172,6 @@ - (void)terminate
173172
}
174173

175174
@end
176-
#endif // ENABLE_OTA_TESTS
177175

178176
@interface MTROTAProviderTestControllerDelegate : NSObject <MTRDeviceControllerDelegate>
179177
@property (nonatomic, readonly) XCTestExpectation * expectation;
@@ -583,8 +581,6 @@ @implementation MTROTAProviderTests {
583581
NSMutableSet<MTROTARequestorAppRunner *> * _runningRequestors;
584582
}
585583

586-
#if ENABLE_OTA_TESTS
587-
588584
+ (void)tearDown
589585
{
590586
// Global teardown, runs once
@@ -1573,6 +1569,14 @@ - (void)test999_TearDown
15731569
[[self class] shutdownStack];
15741570
}
15751571

1576-
#endif // ENABLE_OTA_TESTS
1572+
@end
1573+
1574+
#else // ENABLE_OTA_TESTS
1575+
1576+
@interface MTROTAProviderTests : XCTestCase
1577+
@end
15771578

1579+
@implementation MTROTAProviderTests
15781580
@end
1581+
1582+
#endif // ENABLE_OTA_TESTS

0 commit comments

Comments
 (0)