Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Apr 27, 2024
1 parent a798e37 commit 7827e02
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/instrumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,20 @@ jobs:
- name: "Prepare script to run."
id: script
env:
SCRIPT: ${{ inputs.script }}
SCRIPT: |
# Workaround for https://github.com/ReactiveCircus/android-emulator-runner/issues/373
pre_terminate_crashpad() {
# For some reason pgrep/pkill sees only crashpad_handle, not crashpad_handler,
# but it's definitely called ${ANDROID_HOME}/emulator/crashpad_handler.
# Best-effort gracefully terminate all crashpad_handler processes.
pkill --exact --echo --signal SIGTERM crashpad_handle || return
sleep 10
pkill --exact --echo --signal SIGKILL crashpad_handle || return
}
trap pre_terminate_crashpad EXIT
${{ inputs.script }}
run: |
script_file="${RUNNER_TEMP}/reactivecircus-android-emulator-runner-prepared-script.sh"
echo "${SCRIPT}" > "${script_file}"
Expand Down

0 comments on commit 7827e02

Please sign in to comment.