diff --git a/android-plugin/trace-replay-ci.sh b/android-plugin/trace-replay-ci.sh index 1eaeaff2..a3ded194 100644 --- a/android-plugin/trace-replay-ci.sh +++ b/android-plugin/trace-replay-ci.sh @@ -255,11 +255,14 @@ run_retrace() { adb_device_path shell "$@" app_exited=0 + saw_app_process=0 for _ in $(seq 1 "${timeout_seconds}"); do if adb_device_path shell run-as "${package_name}" ls "${app_dir}/output/result.json" >/dev/null 2>&1; then break fi - if ! adb_device_path shell pidof "${package_name}" >/dev/null 2>&1; then + if adb_device_path shell pidof "${package_name}" >/dev/null 2>&1; then + saw_app_process=1 + elif [ "${saw_app_process}" -eq 1 ]; then app_exited=1 break fi