From ae320574b1e74527b739cf0469c88445bacfa751 Mon Sep 17 00:00:00 2001 From: Vasiliy Stelmachenok Date: Fri, 27 Feb 2026 13:41:40 +0300 Subject: [PATCH] ci: Capture calamares log on failed installation Signed-off-by: Vasiliy Stelmachenok --- .../cachyos/dailylive/test_install_calamares | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/testcases/cachyos/dailylive/test_install_calamares b/testcases/cachyos/dailylive/test_install_calamares index d9bd18b..92f7c79 100644 --- a/testcases/cachyos/dailylive/test_install_calamares +++ b/testcases/cachyos/dailylive/test_install_calamares @@ -11,6 +11,28 @@ function test_setup() { test_password="ILoveCandy" } +function qt_wait_else() { + local test_name="$1" + local fallback="$2" + local text="$3" + local retries=$4 + local interval=$5 + + for c in $( seq 1 $retries ); do + qt_echo "🔁 $c / $retries «$text» " + qt_screenshot_ppm "$test_name" + # We only ever OCR the most recent image, so we just send the text name and the screenshot count + if qt_search_screenshot "$test_name" "$text"; then + return 0 + fi + qt_wait_for_seconds "$interval" + done + + "$fallback" "$test_name" + + qt_test_fail "Coulnd't find text «$text» in screenshot «$QT_SCREENSHOT_COUNT» after $retries retries" +} + function test_post_boot_grub() { qt_wait_for_seconds 5 qt_wait_for_text "$FUNCNAME" "GNU GRUB" 3 5 @@ -144,8 +166,14 @@ function test_calamares_install() { qt_screenshot_ppm "$FUNCNAME" } +function test_calamares_failed() { + qt_send_key_combo "spc" + qt_wait_for_seconds 2 + qt_screenshot_ppm "$FUNCNAME" +} + function test_calamares_finished() { - qt_wait_for_text "$FUNCNAME" "$text_calamares_finished" 30 60 + qt_wait_else "$FUNCNAME" "test_calamares_failed" "$text_calamares_finished" 30 60 qt_send_key_combo "spc" qt_screenshot_ppm "$FUNCNAME" }