From 1f05789ee9955df2163f69bdefbba7fdc744b368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Han=C3=A7erli?= <burak.hancerli@qt.io> Date: Tue, 4 Feb 2025 08:00:08 +0000 Subject: [PATCH] Start testing emulator if it's not running --- cicd/stages/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cicd/stages/test.yml b/cicd/stages/test.yml index 14d0a2e..1fd1728 100644 --- a/cicd/stages/test.yml +++ b/cicd/stages/test.yml @@ -27,6 +27,14 @@ test-x86_64: export PATH=$PATH:${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/ export PATH=$PATH:${ANDROID_SDK_ROOT}/emulator export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools + - | + if [[ $(adb devices | grep emulator) ]]; then + echo "Emulator is running"; + else + echo "Starting emulator"; + /opt/android/emulator/emulator -avd test -no-boot-anim -no-window -no-audio -no-snapshot -accel on & 2>&1 > /dev/null + sleep 30 + fi - cd ${QDS_CI_ARTIFACTS_PATH}/x86_64/test || exit 1 - mkdir -p ${QDS_CI_JOB_TEST_RESULTS_PATH} - adb install -r -g android-build-release.apk -- GitLab