Skip to content

Commit 2707324

Browse files
author
Luna Wei
committed
Update manual testing script to also test Hermes for RNTester
Summary: Changelog: [Internal] - Update test-manual-e2e.sh to test Hermes for RNTester Reviewed By: ShikaSD Differential Revision: D30569403 fbshipit-source-id: fd45c8158c4c5ad93f33bc7b80464c5fc387a737
1 parent b78f6ce commit 2707324

1 file changed

Lines changed: 36 additions & 11 deletions

File tree

scripts/test-manual-e2e.sh

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# This source code is licensed under the MIT license found in the
55
# LICENSE file in the root directory of this source tree.
66

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

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

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

61-
success "Installing CocoaPods dependencies"
59+
60+
info "Once done testing, keep emulator running"
61+
info "Press any key to run RNTester on Android with Hermes enabled"
62+
read -r -n 1
63+
64+
./gradlew :packages:rn-tester:android:app:installHermesDebug || error "Couldn't build RNTester Android"
65+
adb shell am start -n com.facebook.react.uiapp/.RNTesterActivity
66+
67+
info "When done testing RNTester on Android,"
68+
info "Press any key to start testing RNTester in iOS"
69+
read -r -n 1
70+
71+
success "About to test iOS JSC... "
72+
success "Installing CocoaPods dependencies..."
6273
rm -rf packages/rn-tester/Pods
6374
(cd packages/rn-tester && pod install)
6475

6576
info "Press any key to open the workspace in Xcode, then build and test manually."
6677
info ""
67-
read -n 1
78+
read -r -n 1
79+
80+
open "packages/rn-tester/RNTesterPods.xcworkspace"
81+
82+
info "When done testing iOS JSC, press any key to test iOS Hermes"
83+
read -r -n 1
84+
85+
success "About to test iOS Hermes... "
86+
success "Installing CocoaPods dependencies..."
87+
rm -rf packages/rn-tester/Pods
88+
(cd packages/rn-tester && USE_HERMES=1 pod install)
89+
90+
info "Press any key to open the workspace in Xcode, then build and test manually."
91+
info ""
92+
read -r -n 1
6893

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

7196
info "When done testing RNTester app on iOS and Android press any key to continue."
7297
info ""
73-
read -n 1
98+
read -r -n 1
7499

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

87112
project_name="RNTestProject"
88113

89-
cd /tmp/
114+
cd /tmp/ || exit
90115
rm -rf "$project_name"
91116
node "$repo_root/cli.js" init "$project_name" --template "$repo_root"
92117

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

108133
info "Test the following on iOS:"
@@ -115,10 +140,10 @@ info " - Disable Fast Refresh."
115140
info ""
116141
info "Press any key to open the project in Xcode"
117142
info ""
118-
read -n 1
143+
read -r -n 1
119144
open "/tmp/${project_name}/ios/${project_name}.xcworkspace"
120145

121-
cd "$repo_root"
146+
cd "$repo_root" || exit
122147

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

0 commit comments

Comments
 (0)