You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Access to relative paths when invoking test-manual-e2e (facebook#33000)
Summary:
Running `test-manual-e2e.sh` from any folder other than the repo root results in errors regarding files not existing, that's because we're not taking into consideration the path from where the script is invoked. This PR updates it so that we get the absolute path of the script and then use it to get the parent directory and `cd` to the repo root folder.
Closesfacebook#32999
## Changelog
[Internal] [Fixed] - fix access to relative paths when invoking `test-manual-e2e.sh` from folders other than the repo root
Pull Request resolved: facebook#33000
Test Plan:
1. Clone this repo
2. Navigate to the rn-tester folder `cd packages/rn-tester/`
3. Run `../../scripts/test-manual-e2e.sh`
4. Select RNTester, Android and Hermes
https://user-images.githubusercontent.com/11707729/151730441-18bc37de-0224-4f5e-a2fe-408e3ace5c1f.mov
Reviewed By: ShikaSD
Differential Revision: D33915561
Pulled By: cortinico
fbshipit-source-id: 66f2d1ebee50bba3fe884d6346ea08ffced47a96
grep -E "com.facebook.react:react-native:\\+""${project_name}/android/app/build.gradle"|| error "Dependency in /tmp/${project_name}/android/app/build.gradle must be com.facebook.react:react-native:+"
136
141
137
142
success "New sample project generated at /tmp/${project_name}"
143
+
popd>/dev/null ||exit
138
144
}
139
145
140
146
test_template_app(){
141
147
if [ "$PACKAGE_VERSION"=="" ];then
142
148
init_template_app
143
149
fi
144
150
151
+
pushd"/tmp/${project_name}">/dev/null ||exit
145
152
if [ "$selected_platform"=="1" ];then
146
153
info "Test the following on Android:"
147
154
info " - Disable Fast Refresh. It might be enabled from last time (the setting is stored on the device)"
@@ -150,7 +157,7 @@ test_template_app(){
150
157
info "Press any key to run the sample in Android emulator/device"
0 commit comments