File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,14 @@ setup_app_python() {
270270 local platform_yaml
271271
272272 export BSTACK_PARALLELS=1
273- export BROWSERSTACK_CONFIG_FILE=" ./android/browserstack.yml"
273+
274+ # Decide which directory to run based on APP_PLATFORM (default to android)
275+ local run_dir=" android"
276+ if [ " $APP_PLATFORM " = " ios" ]; then
277+ run_dir=" ios"
278+ fi
279+
280+ export BROWSERSTACK_CONFIG_FILE=" ./$run_dir /browserstack.yml"
274281 platform_yaml=$( generate_mobile_platforms " $TEAM_PARALLELS_MAX_ALLOWED_MOBILE " " yaml" )
275282
276283 cat >> " $BROWSERSTACK_CONFIG_FILE " << EOF
@@ -279,12 +286,6 @@ platforms:
279286$platform_yaml
280287EOF
281288
282- # Decide which directory to run based on APP_PLATFORM (default to android)
283- local run_dir=" android"
284- if [ " $APP_PLATFORM " = " ios" ]; then
285- run_dir=" ios"
286- fi
287-
288289 export BSTACK_PLATFORMS=$platform_yaml
289290 export BROWSERSTACK_LOCAL=true
290291 export BROWSERSTACK_BUILD_NAME=" now-$NOW_OS -app-python-pytest"
302303 # Run pytest with BrowserStack SDK from the chosen platform directory
303304 log_msg_to " 🚀 Running 'cd $run_dir && browserstack-sdk pytest -s bstack_sample.py'"
304305 (
305- cd " $run_dir " && browserstack-sdk pytest -s bstack_sample.py >> " $NOW_RUN_LOG_FILE " 2>&1 || return 1
306+ cd " $run_dir " && browserstack-sdk pytest -s bstack_sample.py >> " $NOW_RUN_LOG_FILE " 2>&1 || return 1 & cmd_pid=$! || return 1
307+ show_spinner " $cmd_pid "
308+ wait " $cmd_pid "
306309 )
307310
308311 deactivate
You can’t perform that action at this time.
0 commit comments