|
41 | 41 | #undef ENABLE_REAL_OTA_UPDATE_TESTS
|
42 | 42 | #endif
|
43 | 43 |
|
| 44 | +#if ENABLE_OTA_TESTS |
| 45 | + |
44 | 46 | static const uint16_t kPairingTimeoutInSeconds = 10;
|
45 | 47 | static const uint16_t kTimeoutInSeconds = 3;
|
46 | 48 | static const uint16_t kTimeoutWithUpdateInSeconds = 60;
|
|
78 | 80 | @class MTROTARequestorAppRunner;
|
79 | 81 |
|
80 | 82 | @interface MTROTAProviderTests : XCTestCase
|
81 |
| -#if ENABLE_OTA_TESTS |
82 | 83 | - (NSTask *)createTaskForPath:(NSString *)path;
|
83 | 84 | - (NSString *)createImageFromRawImage:(NSString *)rawImage withVersion:(NSNumber *)version;
|
84 | 85 | - (MTRDevice *)commissionDeviceWithPayload:(NSString *)payloadString nodeID:(NSNumber *)nodeID;
|
85 | 86 | - (void)registerRunningRequestor:(MTROTARequestorAppRunner *)requestor;
|
86 |
| -#endif // ENABLE_OTA_TESTS |
87 | 87 | @end
|
88 | 88 |
|
89 |
| -#if ENABLE_OTA_TESTS |
90 | 89 | static unsigned sAppRunnerIndex = 1;
|
91 | 90 |
|
92 | 91 | @interface MTROTARequestorAppRunner : NSObject
|
@@ -173,7 +172,6 @@ - (void)terminate
|
173 | 172 | }
|
174 | 173 |
|
175 | 174 | @end
|
176 |
| -#endif // ENABLE_OTA_TESTS |
177 | 175 |
|
178 | 176 | @interface MTROTAProviderTestControllerDelegate : NSObject <MTRDeviceControllerDelegate>
|
179 | 177 | @property (nonatomic, readonly) XCTestExpectation * expectation;
|
@@ -583,8 +581,6 @@ @implementation MTROTAProviderTests {
|
583 | 581 | NSMutableSet<MTROTARequestorAppRunner *> * _runningRequestors;
|
584 | 582 | }
|
585 | 583 |
|
586 |
| -#if ENABLE_OTA_TESTS |
587 |
| - |
588 | 584 | + (void)tearDown
|
589 | 585 | {
|
590 | 586 | // Global teardown, runs once
|
@@ -1573,6 +1569,14 @@ - (void)test999_TearDown
|
1573 | 1569 | [[self class] shutdownStack];
|
1574 | 1570 | }
|
1575 | 1571 |
|
1576 |
| -#endif // ENABLE_OTA_TESTS |
| 1572 | +@end |
| 1573 | + |
| 1574 | +#else // ENABLE_OTA_TESTS |
| 1575 | + |
| 1576 | +@interface MTROTAProviderTests : XCTestCase |
| 1577 | +@end |
1577 | 1578 |
|
| 1579 | +@implementation MTROTAProviderTests |
1578 | 1580 | @end
|
| 1581 | + |
| 1582 | +#endif // ENABLE_OTA_TESTS |
0 commit comments