From 8b0967ae7e1b0f23885459042983255564eedef2 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Tue, 10 Sep 2024 04:08:51 +0200 Subject: [PATCH] try to fix screen recording on Android as well --- .github/workflows/test-e2e.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-e2e.yaml b/.github/workflows/test-e2e.yaml index d624daa362..8a37a0c3d6 100644 --- a/.github/workflows/test-e2e.yaml +++ b/.github/workflows/test-e2e.yaml @@ -153,6 +153,7 @@ jobs: - name: Start screen recording of AVD run: | adb shell screenrecord /sdcard/screenrecord.mp4 & + echo $! > ~/screenrecord.pid - name: Run tests working-directory: ${{ github.workspace }}/e2e @@ -162,7 +163,7 @@ jobs: - name: Stop screen recording of AVD if: success() || failure() run: | - adb shell pkill -SIGINT screenrecord || echo "exited with code $?" && exit 0 + kill -SIGINT "$(cat ~/screenrecord.pid)" sleep 5 # prevent video file corruption adb pull /sdcard/screenrecord.mp4 ~/screenrecord.mp4