Skip to content

Commit

Permalink
Bump Xcode to 11.2.1 (#27434)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook/react-native#27434
Pull Request resolved: facebook/react-native#27295

- Use Xcode version 11.2.1 in both internal and external tests.
- Update snapshot reference images to use iPhone 8 test device.

Xcode 11.3.0 will be available in Sandcastle in the next week or so.

Changelog:

[Internal] - Bump Xcode version used in tests to 11.2.1.
[Internal] - Update iOS Snapshots.

Reviewed By: cs01

Differential Revision: D18849584

fbshipit-source-id: 9e3b92f080a4dc6a15dac0535b7562ff6a5c08a9
  • Loading branch information
hramos authored and facebook-github-bot committed Jan 14, 2020
1 parent 7c066ae commit 9fb2ca0
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ executors:
reactnativeios:
<<: *defaults
macos:
xcode: "10.3.0"
xcode: "11.2.1"

# -------------------------
# COMMANDS
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions RNTester/RNTesterUnitTests/RCTJSONTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,14 @@ - (void)testNaN
XCTAssertEqualObjects(json, RCTJSONStringify(obj, NULL));
}

// TODO: This test crashes iOS 13 for bad access, please investigate and re-enable.
// - (void)testNotUTF8Convertible
// {
// //see https://gist.github.com/0xced/56035d2f57254cf518b5
// NSString *string = [[NSString alloc] initWithBytes:"\xd8\x00" length:2 encoding:NSUTF16StringEncoding];
// NSDictionary<NSString *, id> *obj = @{@"foo": string};
// NSString *json = @"{\"foo\":null}";
// XCTAssertEqualObjects(json, RCTJSONStringify(obj, NULL));
// }
- (void)testNotUTF8Convertible
{
//see https://gist.github.com/0xced/56035d2f57254cf518b5
NSString *string = [[NSString alloc] initWithBytes:"\xd8\x00" length:2 encoding:NSUTF16StringEncoding];
NSDictionary<NSString *, id> *obj = @{@"foo": string};
NSString *json = @"{\"foo\":null}";
XCTAssertEqualObjects(json, RCTJSONStringify(obj, NULL));
}

- (void)testErrorPointer
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/.tests.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export AVD_NAME="testAVD"
export AVD_ABI=x86

## IOS ##
export IOS_TARGET_OS="13.3"
export IOS_TARGET_OS="13.2.2"
export IOS_DEVICE="iPhone 8"
export TVOS_DEVICE="Apple TV"

Expand Down
8 changes: 7 additions & 1 deletion scripts/objc-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT=$(dirname "$SCRIPTS")

SKIPPED_TESTS=()
# TODO: T60408036 This test crashes iOS 13 for bad access, please investigate
# and re-enable. See https://gist.github.com/0xced/56035d2f57254cf518b5.
SKIPPED_TESTS+=("-skip-testing:RNTesterUnitTests/testNotUTF8Convertible")

# Create cleanup handler
cleanup() {
EXIT=$?
Expand Down Expand Up @@ -56,7 +61,8 @@ runTests() {
-workspace RNTester/RNTesterPods.xcworkspace \
-scheme RNTester \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS"
-destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS" \
"${SKIPPED_TESTS[@]}"
}

buildProject() {
Expand Down
5 changes: 3 additions & 2 deletions scripts/run-ci-e2e-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,15 @@ try {

describe('Test: ' + iosTestType + ' end-to-end test');
if (
// TODO: Get target OS and simulator from .tests.env
tryExecNTimes(
() => {
let destination = 'platform=iOS Simulator,name=iPhone 8,OS=13.3';
let destination = 'platform=iOS Simulator,name=iPhone 8,OS=13.2.2';
let sdk = 'iphonesimulator';
let scheme = 'HelloWorld';

if (argv.tvos) {
destination = 'platform=tvOS Simulator,name=Apple TV,OS=13.3';
destination = 'platform=tvOS Simulator,name=Apple TV,OS=13.2.2';
sdk = 'appletvsimulator';
scheme = 'HelloWorld-tvOS';
}
Expand Down

0 comments on commit 9fb2ca0

Please sign in to comment.