fix(ios-test): remove local keyword from top-level assignments
The script was using 'local' keyword outside of function scope, which caused "local: can only be used in a function" error when running test-phase2.sh. Removed 'local' from three variable assignments (device_id and logs) at script top level, as 'local' is only valid inside functions in bash/zsh.
This commit is contained in:
@@ -33,7 +33,7 @@ check_plugin_configured
|
|||||||
wait_for_ui_action "Schedule a notification for future time."
|
wait_for_ui_action "Schedule a notification for future time."
|
||||||
|
|
||||||
print_info "Terminating app to simulate system termination..."
|
print_info "Terminating app to simulate system termination..."
|
||||||
local device_id=$(get_simulator_id)
|
device_id=$(get_simulator_id)
|
||||||
xcrun simctl terminate "${device_id}" "${APP_BUNDLE_ID}" 2>/dev/null || true
|
xcrun simctl terminate "${device_id}" "${APP_BUNDLE_ID}" 2>/dev/null || true
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
@@ -43,8 +43,8 @@ launch_app
|
|||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
print_info "Checking logs for termination detection..."
|
print_info "Checking logs for termination detection..."
|
||||||
local device_id=$(get_simulator_id)
|
device_id=$(get_simulator_id)
|
||||||
local logs=$(get_app_logs "${device_id}" 100)
|
logs=$(get_app_logs "${device_id}" 100)
|
||||||
|
|
||||||
if echo "${logs}" | grep -q "termination\|DNP-REACTIVATION"; then
|
if echo "${logs}" | grep -q "termination\|DNP-REACTIVATION"; then
|
||||||
print_success "Recovery activity detected"
|
print_success "Recovery activity detected"
|
||||||
|
|||||||
Reference in New Issue
Block a user