diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2025-06-15 21:25:06 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2025-06-18 19:14:52 +0000 |
| commit | c3f77bc67473c46ecd0b8c290f28f013ee4bdaca (patch) | |
| tree | 8e44a262929d1fb2be7acbf5c4ca73f0c72f3f22 /examples | |
| parent | 13da3410df257b9a24fef692ca907ace9066b546 (diff) | |
ci: QEMU esp32c3: There is no kill like overkill
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/esp32c3/runner.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/esp32c3/runner.sh b/examples/esp32c3/runner.sh index bfaf5f9..67d1007 100755 --- a/examples/esp32c3/runner.sh +++ b/examples/esp32c3/runner.sh @@ -33,6 +33,18 @@ sleep 3s echo q | nc -N 127.0.0.1 55555 >>"$tempdir"/$qemuoutputfile 2>&1 # Output that will be compared must be printed to stdout +sleep 0.1s +# If still running, try again nicely +pgrep -af "qemu-system.*" >/dev/null 2>&1 && echo q | nc -N 127.0.0.1 55555 >>"$tempdir"/$qemuoutputfile 2>&1 + +# Ask a bit more firmly with SIGTERM +pgrep -af "qemu-system.*" >/dev/null 2>&1 && kill $qemupid >/dev/null 2>&1 + +pgrep -af "qemu-system.*" >/dev/null 2>&1 && sleep 0.1s >/dev/null 2>&1 + +# Time to die +pgrep -af "qemu-system.*" >/dev/null 2>&1 && kill -9 $qemupid >/dev/null 2>&1 + # Make boot phase silent, for debugging change, run with e.g. $ `env DEBUGGING=true` cargo xtask.... if [ -n "${DEBUGGING}" ]; then # Debugging: strip leading "I (xyz)" where xyz is an incrementing number, and esp_image specifics |
