From 30e3006e3fa539897ffe38b04397cae3b48db324 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Mon, 25 May 2026 09:30:28 +0200 Subject: [PATCH] Allow theme identity test without local preview script preview.sh is an ignored developer helper and is not present in CI checkouts. Keep validating it when available locally, but in CI check that it remains ignored instead of failing on a missing file. --- tests/check-shift-theme-identity.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/check-shift-theme-identity.sh b/tests/check-shift-theme-identity.sh index 77f12f8d..bd1859b3 100644 --- a/tests/check-shift-theme-identity.sh +++ b/tests/check-shift-theme-identity.sh @@ -111,22 +111,27 @@ require_line lookandfeel/contents/logout/Logout.qml 'plasma_lookandfeel_org\.shi require_line lookandfeel/Messages.sh 'plasma_lookandfeel_org\.shift\.mobile\.pot' \ "look-and-feel Messages.sh must generate the Shift translation domain" -require_line preview.sh 'PLASMA_THEME=shift-light' \ - "preview light mode must select the Shift light Plasma desktop theme" -require_line preview.sh 'PLASMA_THEME=shift-dark' \ - "preview dark mode must select the Shift dark Plasma desktop theme" -reject_line preview.sh 'PLASMA_THEME=breeze-' \ - "preview must not select Breeze Plasma desktop themes" -require_line preview.sh 'Shift does not ship a QQC2 style plugin yet' \ - "preview must document the Breeze QQC2 fallback" +if [[ -f preview.sh ]]; then + require_line preview.sh 'PLASMA_THEME=shift-light' \ + "preview light mode must select the Shift light Plasma desktop theme" + require_line preview.sh 'PLASMA_THEME=shift-dark' \ + "preview dark mode must select the Shift dark Plasma desktop theme" + reject_line preview.sh 'PLASMA_THEME=breeze-' \ + "preview must not select Breeze Plasma desktop themes" + require_line preview.sh 'Shift does not ship a QQC2 style plugin yet' \ + "preview must document the Breeze QQC2 fallback" + reject_line preview.sh 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \ + "preview must not reference a non-existent Shift QQC2 style" +else + require_line .gitignore '^preview[.]sh$' \ + "preview.sh is a local developer script and must remain ignored when absent from CI" +fi require_line bin/startplasmamobile.in 'Shift does not ship a QQC2 style plugin yet' \ "runtime launcher must document the Breeze QQC2 fallback" require_line HACKING.md 'Shift does not ship a QQC2 style plugin yet' \ "HACKING.md must document the Breeze QQC2 fallback" require_line .kde-ci.yml 'plasma/qqc2-breeze-style' \ "CI must keep the Breeze QQC2 runtime dependency until Shift ships a QQC2 style" -reject_line preview.sh 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \ - "preview must not reference a non-existent Shift QQC2 style" reject_line bin/startplasmamobile.in 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \ "runtime launcher must not reference a non-existent Shift QQC2 style"