Travis CI reliability fixes: preload package manager and increase tim…

Summary:
- Consolidate common code in iOS and tvOS test scripts
- Start the packager before starting tests, to improve reliability
- Increase timeout value in RCTTestRunner.m
Closes https://github.com/facebook/react-native/pull/10378

Differential Revision: D4028364

Pulled By: bestander

fbshipit-source-id: 24c2124a1c62643a02f0668b60a67b971e08d1a3
This commit is contained in:
dlowder-salesforce
2016-10-16 15:37:45 -07:00
committed by Facebook Github Bot
parent f8b0728d9b
commit 64a4c6070d
13 changed files with 187 additions and 56 deletions

View File

@@ -14,8 +14,10 @@
@interface RCTConvert (UIStatusBar)
#if !TARGET_OS_TV
+ (UIStatusBarStyle)UIStatusBarStyle:(id)json;
+ (UIStatusBarAnimation)UIStatusBarAnimation:(id)json;
#endif
@end

View File

@@ -13,6 +13,7 @@
#import "RCTLog.h"
#import "RCTUtils.h"
#if !TARGET_OS_TV
@implementation RCTConvert (UIStatusBar)
RCT_ENUM_CONVERTER(UIStatusBarStyle, (@{
@@ -28,6 +29,7 @@ RCT_ENUM_CONVERTER(UIStatusBarAnimation, (@{
}), UIStatusBarAnimationNone, integerValue);
@end
#endif
@implementation RCTStatusBarManager
@@ -51,6 +53,8 @@ RCT_EXPORT_MODULE()
@"statusBarFrameWillChange"];
}
#if !TARGET_OS_TV
- (void)startObserving
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
@@ -128,4 +132,6 @@ RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible:(BOOL)visible)
RCTSharedApplication().networkActivityIndicatorVisible = visible;
}
#endif //TARGET_OS_TV
@end