mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Summary: Fixes an issue where `scripts/objc-test-ios.sh` would fail if `xcpretty` is not installed. As this tool is not bundled with macOS, and it's not explicitly called out in our docs on testing, the script should not fail if it's not present. In a related change, JUnit reports are written to a more sensible location when the script is run outside of Circle CI. [iOS] [Fixed] - Fixed test script failure when xcpretty is not present Pull Request resolved: https://github.com/facebook/react-native/pull/24173 Differential Revision: D14726101 Pulled By: hramos fbshipit-source-id: 9f3081a75a4a262f55aef8498241fe7d1e04b931
32 lines
902 B
Bash
Executable File
32 lines
902 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
#
|
|
# Script used to run iOS tests.
|
|
# If no arguments are passed to the script, it will only compile
|
|
# the RNTester.
|
|
# If the script is called with a single argument "test", we'll
|
|
# also run the RNTester integration test (needs JS and packager):
|
|
# ./objc-test-ios.sh test
|
|
|
|
set -e
|
|
|
|
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
ROOT=$(dirname "$SCRIPTS")
|
|
|
|
cd "$ROOT"
|
|
|
|
# shellcheck disable=SC1091
|
|
source "scripts/.tests.env"
|
|
|
|
export TEST_NAME="iOS"
|
|
export SCHEME="RNTester"
|
|
export SDK="iphonesimulator"
|
|
export DESTINATION="platform=iOS Simulator,name=${IOS_DEVICE},OS=${IOS_TARGET_OS}"
|
|
export USE_MODERN_BUILD_SYSTEM="NO"
|
|
|
|
# If there's a "test" argument, pass it to the test script.
|
|
./scripts/objc-test.sh $1
|