Skip to content

Commit 1ef5a46

Browse files
committed
Move tests to Xcode9.2
1 parent 7d70b86 commit 1ef5a46

File tree

7 files changed

+19
-6
lines changed

7 files changed

+19
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: objective-c
22

3-
osx_image: xcode7
3+
osx_image: xcode7.2
44

55
cache:
66
directories:

Examples/UIExplorer/UIExplorerUnitTests/RCTBridgeTests.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ - (void)setUp {}
4545

4646
- (instancetype)init
4747
{
48+
NSLog(@"New TestExecutor created");
4849
if (self = [super init]) {
4950
_injectedStuff = [NSMutableDictionary dictionary];
5051
}
@@ -92,6 +93,7 @@ - (void)injectJSONText:(NSString *)script
9293
asGlobalObjectNamed:(NSString *)objectName
9394
callback:(RCTJavaScriptCompleteBlock)onComplete
9495
{
96+
NSLog(@"Injecting config with name %@", objectName);
9597
_injectedStuff[objectName] = script;
9698
onComplete(nil);
9799
}
@@ -140,6 +142,7 @@ - (void)tearDown
140142

141143
_testMethodCalled = NO;
142144

145+
NSLog(@"tearDown: invalidating <RCTBridge: %p>", _bridge);
143146
[_bridge invalidate];
144147
_bridge = nil;
145148

React/Base/RCTBatchedBridge.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ - (instancetype)initWithParentBridge:(RCTBridge *)bridge
9898

9999
- (void)start
100100
{
101+
NSLog(@"<RCTBatchedBridge: %p> setup", self);
102+
101103
dispatch_queue_t bridgeQueue = dispatch_queue_create("com.facebook.react.RCTBridgeQueue", DISPATCH_QUEUE_CONCURRENT);
102104

103105
dispatch_group_t initModulesAndLoadSource = dispatch_group_create();
@@ -141,8 +143,8 @@ - (void)start
141143

142144
// Asynchronously gather the module config
143145
dispatch_group_async(setupJSExecutorAndModuleConfig, bridgeQueue, ^{
146+
NSLog(@"Module config generation");
144147
if (weakSelf.isValid) {
145-
146148
RCTPerformanceLoggerStart(RCTPLNativeModulePrepareConfig);
147149
config = [weakSelf moduleConfig];
148150
RCTPerformanceLoggerEnd(RCTPLNativeModulePrepareConfig);
@@ -151,11 +153,12 @@ - (void)start
151153
NSInteger total = [[_moduleDataByID valueForKeyPath:@"@sum.hasInstance"] integerValue];
152154
_asyncInitializedModules = total - _syncInitializedModules;
153155
#endif
154-
155156
}
156157
});
157158

158159
dispatch_group_notify(setupJSExecutorAndModuleConfig, bridgeQueue, ^{
160+
NSLog(@"Module config injection");
161+
159162
// We're not waiting for this to complete to leave dispatch group, since
160163
// injectJSONConfiguration and executeSourceCode will schedule operations
161164
// on the same queue anyway.
@@ -409,9 +412,11 @@ - (void)injectJSONConfiguration:(NSString *)configJSON
409412
onComplete:(void (^)(NSError *))onComplete
410413
{
411414
if (!self.valid) {
415+
NSLog(@"Bridge is not valid, not injecting JSON");
412416
return;
413417
}
414418

419+
NSLog(@"Bridge _is_ valid, injecting JSON to %@", _javaScriptExecutor);
415420
[_javaScriptExecutor injectJSONText:configJSON
416421
asGlobalObjectNamed:@"__fbBatchedBridgeConfig"
417422
callback:onComplete];
@@ -561,6 +566,8 @@ - (void)invalidate
561566
return;
562567
}
563568

569+
NSLog(@"<RCTBatchedBridge: %p> invalidate called", self);
570+
564571
RCTAssertMainThread();
565572

566573
_loading = NO;

React/Base/RCTBridge.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ - (BOOL)isBatchActive
289289

290290
- (void)invalidate
291291
{
292+
NSLog(@"<RCTBridge: %p> invalidate called, invalidating <RCTBatchedBridge: %p> too", self, self.batchedBridge);
292293
RCTBatchedBridge *batchedBridge = (RCTBatchedBridge *)self.batchedBridge;
293294
self.batchedBridge = nil;
294295

React/Executors/RCTJSCExecutor.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ - (void)injectJSONText:(NSString *)script
552552
asGlobalObjectNamed:(NSString *)objectName
553553
callback:(RCTJavaScriptCompleteBlock)onComplete
554554
{
555+
NSLog(@"RCTJSCExecutor: injectJSONText");
556+
555557
if (RCT_DEBUG) {
556558
RCTAssert(RCTJSONParse(script, NULL) != nil, @"%@ wasn't valid JSON!", script);
557559
}

scripts/e2e-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Abort the mission if any command fails
44
set -e
5+
set -x
56

67
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
78
ROOT=$(dirname $SCRIPTS)
@@ -58,9 +59,8 @@ npm unpublish react-native-cli --force
5859
npm publish $ROOT
5960
npm publish $ROOT/react-native-cli
6061

61-
6262
npm install -g react-native-cli
63-
react-native init EndToEndTest
63+
react-native init EndToEndTest --verbose
6464
cd EndToEndTest/ios
6565

6666
# Make sure we installed local version of react-native

scripts/objc-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ trap cleanup EXIT
2828
SERVER_PID=$!
2929
xctool \
3030
-project Examples/UIExplorer/UIExplorer.xcodeproj \
31-
-scheme UIExplorer -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=9.0' \
31+
-scheme UIExplorer -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=9.2' \
3232
test

0 commit comments

Comments
 (0)