mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-10 13:18:31 +09:00
[Fix] (trace-replay): avoid Android startup race
This commit is contained in:
@@ -255,11 +255,14 @@ run_retrace() {
|
|||||||
adb_device_path shell "$@"
|
adb_device_path shell "$@"
|
||||||
|
|
||||||
app_exited=0
|
app_exited=0
|
||||||
|
saw_app_process=0
|
||||||
for _ in $(seq 1 "${timeout_seconds}"); do
|
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
|
if adb_device_path shell run-as "${package_name}" ls "${app_dir}/output/result.json" >/dev/null 2>&1; then
|
||||||
break
|
break
|
||||||
fi
|
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
|
app_exited=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user