mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Fix] (trace-replay): avoid Android startup race
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user