forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Update `scripts/run-android-emulator.sh` to use same settings as Circle CI when creating and launching an AVD. This helps provide a known good configuration, useful for running Android tests locally. Run `scripts/run-android-emulator.sh` and confirm AVD is created && launched Run `scripts/run-android-emulator.sh` again and see message about AVD already running Run `test_android` on CI and observe AVD is launched. Run `runXcodeTests.sh` and confirm unit tests run. Run CI and confirm iOS unit tests run. [GENERAL][MINOR][`scripts`] - Consolidate CI/local test scripts Closes facebook#19228 Differential Revision: D8019888 Pulled By: hramos fbshipit-source-id: 28b12c2e781ee80bcc90c22e691a5acb16232369
- Loading branch information
1 parent
1ad8351
commit 2472d91
Showing
7 changed files
with
85 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#!/bin/sh | ||
# This script should be run from the react-native root | ||
|
||
# Run from react-native root | ||
THIS_DIR=$(dirname "$0") | ||
source "scripts/.tests.env" | ||
|
||
set -e | ||
|
||
if [ -z "$1" ] | ||
if [ -n "$1" ] | ||
then | ||
echo "You must supply an OS version as the first arg, e.g. 8.1" | ||
exit 255 | ||
echo "Overriding..." | ||
IOS_TARGET_OS="${1}" | ||
SDK="iphonesimulator${1}" | ||
DESTINATION="platform=iOS Simulator,OS=${IOS_TARGET_OS},name=${IOS_DEVICE}" | ||
fi | ||
|
||
xctool \ | ||
-project RNTester/RNTester.xcodeproj \ | ||
-scheme RNTester \ | ||
-sdk iphonesimulator${1} \ | ||
-destination "platform=iOS Simulator,OS=${1},name=iPhone 5" \ | ||
xcodebuild \ | ||
-project "RNTester/RNTester.xcodeproj" \ | ||
-scheme $SCHEME \ | ||
-sdk $SDK \ | ||
-destination "$DESTINATION" \ | ||
build test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# These should match the recommended versions listed in | ||
# https://facebook.github.io/react-native/docs/getting-started.html | ||
|
||
|
||
## ANDROID ## | ||
# Android SDK Build Tools revision | ||
export ANDROID_SDK_BUILD_TOOLS_REVISION=23.0.1 | ||
# Android API Level we build with | ||
export ANDROID_SDK_BUILD_API_LEVEL="23" | ||
# Minimum Android API Level we target | ||
export ANDROID_SDK_TARGET_API_LEVEL="19" | ||
# Android Virtual Device name | ||
export AVD_NAME="testAVD" | ||
# ABI to use in Android Virtual Device | ||
export AVD_ABI=x86 | ||
|
||
## IOS ## | ||
export IOS_TARGET_OS="11.3" | ||
export IOS_DEVICE="iPhone 5s" | ||
|
||
export SCHEME="RNTester" | ||
export SDK="iphonesimulator${IOS_TARGET_OS}" | ||
export DESTINATION="platform=iOS Simulator,OS=${IOS_TARGET_OS},name=${IOS_DEVICE}" | ||
|
||
## CI OVERRIDES ## | ||
# Values to override when running in CI | ||
# $CI is set by Circle CI | ||
if [ $CI ]; then | ||
# Use ARM on Circle CI | ||
export AVD_ABI=armeabi-v7a | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.