mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 12:25:59 +08:00
Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh)
Summary: * Motivation * Second PR for Apple TV support. * Test plan * Apple TV tests have been added to scripts/objc-test.sh Closes https://github.com/facebook/react-native/pull/10227 Differential Revision: D3974064 Pulled By: javache fbshipit-source-id: 36dffb4517efa489e40fa713a30655d1d76ef646
This commit is contained in:
committed by
Facebook Github Bot
parent
91d266ba87
commit
8622998335
@@ -33,6 +33,35 @@ set +e
|
||||
OUTPUT_TOOL=$(which xcpretty)
|
||||
set -e
|
||||
|
||||
# TODO: We use xcodebuild because xctool would stall when collecting info about
|
||||
# the tests before running them. Switch back when this issue with xctool has
|
||||
# been resolved.
|
||||
if [ -z "$OUTPUT_TOOL" ]; then
|
||||
xcodebuild \
|
||||
-project $XCODE_PROJECT \
|
||||
-scheme $XCODE_SCHEME \
|
||||
-sdk $XCODE_SDK \
|
||||
-destination "$XCODE_DESTINATION" \
|
||||
test
|
||||
else
|
||||
xcodebuild \
|
||||
-project $XCODE_PROJECT \
|
||||
-scheme $XCODE_SCHEME \
|
||||
-sdk $XCODE_SDK \
|
||||
-destination "$XCODE_DESTINATION" \
|
||||
test | $OUTPUT_TOOL
|
||||
fi
|
||||
|
||||
XCODE_PROJECT="Examples/UIExplorer/UIExplorer.xcodeproj"
|
||||
XCODE_SCHEME="UIExplorer-tvOS"
|
||||
XCODE_SDK="appletvsimulator"
|
||||
XCODE_DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p,OS=9.2"
|
||||
|
||||
# Support for environments without xcpretty installed
|
||||
set +e
|
||||
OUTPUT_TOOL=$(which xcpretty)
|
||||
set -e
|
||||
|
||||
# TODO: We use xcodebuild because xctool would stall when collecting info about
|
||||
# the tests before running them. Switch back when this issue with xctool has
|
||||
# been resolved.
|
||||
@@ -51,3 +80,4 @@ else
|
||||
-destination "$XCODE_DESTINATION" \
|
||||
test | $OUTPUT_TOOL && exit ${PIPESTATUS[0]}
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user