Skip to content

Commit

Permalink
Update manual testing script to also test Hermes for RNTester
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal] - Update test-manual-e2e.sh to test Hermes for RNTester

Reviewed By: ShikaSD

Differential Revision: D30569403

fbshipit-source-id: fd45c8158c4c5ad93f33bc7b80464c5fc387a737
  • Loading branch information
Luna Wei authored and facebook-github-bot committed Aug 26, 2021
1 parent 362511d commit 732ac17
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions scripts/test-manual-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

JAVA_VERSION="1.7"

RED="\033[0;31m"
GREEN="\033[0;32m"
BLUE="\033[0;35m"
Expand Down Expand Up @@ -49,28 +47,55 @@ lsof -i :8081 | grep LISTEN | /usr/bin/awk '{print $2}' | xargs kill
info "Start the packager in another terminal by running 'npm start' from the root"
info "and then press any key."
info ""
read -n 1
read -r -n 1

./gradlew :packages:rn-tester:android:app:installJscDebug || error "Couldn't build RNTester Android"

info "Press any key to run RNTester in an already running Android emulator/device"
info ""
read -n 1
read -r -n 1
adb shell am start -n com.facebook.react.uiapp/.RNTesterActivity

success "Installing CocoaPods dependencies"

info "Once done testing, keep emulator running"
info "Press any key to run RNTester on Android with Hermes enabled"
read -r -n 1

./gradlew :packages:rn-tester:android:app:installHermesDebug || error "Couldn't build RNTester Android"
adb shell am start -n com.facebook.react.uiapp/.RNTesterActivity

info "When done testing RNTester on Android,"
info "Press any key to start testing RNTester in iOS"
read -r -n 1

success "About to test iOS JSC... "
success "Installing CocoaPods dependencies..."
rm -rf packages/rn-tester/Pods
(cd packages/rn-tester && pod install)

info "Press any key to open the workspace in Xcode, then build and test manually."
info ""
read -n 1
read -r -n 1

open "packages/rn-tester/RNTesterPods.xcworkspace"

info "When done testing iOS JSC, press any key to test iOS Hermes"
read -r -n 1

success "About to test iOS Hermes... "
success "Installing CocoaPods dependencies..."
rm -rf packages/rn-tester/Pods
(cd packages/rn-tester && USE_HERMES=1 pod install)

info "Press any key to open the workspace in Xcode, then build and test manually."
info ""
read -r -n 1

open "packages/rn-tester/RNTesterPods.xcworkspace"

info "When done testing RNTester app on iOS and Android press any key to continue."
info ""
read -n 1
read -r -n 1

success "Killing packager"
lsof -i :8081 | grep LISTEN
Expand All @@ -86,7 +111,7 @@ success "React Native version changed in the template"

project_name="RNTestProject"

cd /tmp/
cd /tmp/ || exit
rm -rf "$project_name"
node "$repo_root/cli.js" init "$project_name" --template "$repo_root"

Expand All @@ -102,7 +127,7 @@ info " - Verify 'Reload JS' works"
info ""
info "Press any key to run the sample in Android emulator/device"
info ""
read -n 1
read -r -n 1
cd "/tmp/${project_name}" && npx react-native run-android

info "Test the following on iOS:"
Expand All @@ -115,10 +140,10 @@ info " - Disable Fast Refresh."
info ""
info "Press any key to open the project in Xcode"
info ""
read -n 1
read -r -n 1
open "/tmp/${project_name}/ios/${project_name}.xcworkspace"

cd "$repo_root"
cd "$repo_root" || exit

info "Next steps:"
info " - https://github.com/facebook/react-native/blob/HEAD/Releases.md"

0 comments on commit 732ac17

Please sign in to comment.