mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 17:13:10 +00:00
ci: print the emulator's state and keep its crash reports when the Android smoke test fails
When the emulator dies during the smoke test, the step only says "no emulator detected" and the emulator's own log stops without a reason. After a failed smoke test the job now prints adb's devices, the emulator process, the kernel log's tail and free memory, and uploads the emulator's crash reports with the smoke test results.
This commit is contained in:
1 parent
9c90308fe5
commit
515c7a4a71
1 file changed
+16
@@ -274,6 +274,7 @@ jobs:
|
||||
run: scripts/ci/android/emulator.sh reverse 5223
|
||||
|
||||
- name: Run smoke test
|
||||
id: smoke
|
||||
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.backend.outcome != 'failure' && steps.reach.outcome != 'failure' }}
|
||||
env:
|
||||
BACKEND: ${{ steps.reach.outcome }}
|
||||
@@ -284,6 +285,21 @@ jobs:
|
||||
fi
|
||||
scripts/ci/android/smoke-test.sh "$RUNNER_TEMP/apk/$APK" "$RUNNER_TEMP/smoke-test" ${cases:-}
|
||||
|
||||
# an emulator that dies mid-test leaves no line in its own log: the kernel's and its crash reports say how
|
||||
- name: Emulator state after a failed smoke test
|
||||
if: ${{ !cancelled() && steps.smoke.outcome == 'failure' }}
|
||||
run: |
|
||||
adb devices
|
||||
pgrep -af qemu-system || echo "no emulator process"
|
||||
sudo dmesg | tail -n 40
|
||||
free -m
|
||||
crashes=$(ls -d /tmp/android-"$USER"/emu-crash-* 2> /dev/null || true)
|
||||
if [ -n "$crashes" ]; then
|
||||
find $crashes -type f -exec ls -la {} +
|
||||
mkdir -p "$RUNNER_TEMP/smoke-test/emulator-crashes"
|
||||
cp -r $crashes "$RUNNER_TEMP/smoke-test/emulator-crashes/"
|
||||
fi
|
||||
|
||||
- name: Stop test backend
|
||||
if: ${{ !cancelled() && steps.backend.outcome != 'skipped' }}
|
||||
run: scripts/ci/desktop-linux/backend.sh stop "$RUNNER_TEMP/backend"
|
||||
|
||||
Reference in new issue
Block a user