From: Michael Biebl Date: Wed, 25 Jan 2023 08:13:37 +0000 (+0100) Subject: test: skip firstboot --prompt-keymap check if keymaps are missing X-Git-Tag: archive/raspbian/252.5-2+rpi1^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=76aa28fc71b7ca57e33d9234026c460d025abaed;p=systemd.git test: skip firstboot --prompt-keymap check if keymaps are missing Gbp-Pq: Topic debian Gbp-Pq: Name test-skip-firstboot-prompt-keymap-check-if-keymaps-are-mi.patch --- diff --git a/test/units/testsuite-74.firstboot.sh b/test/units/testsuite-74.firstboot.sh index 36e265ed..c3be8f1c 100755 --- a/test/units/testsuite-74.firstboot.sh +++ b/test/units/testsuite-74.firstboot.sh @@ -148,8 +148,14 @@ touch "$ROOT/bin/fooshell" "$ROOT/bin/barshell" echo -ne "\nfoo\nbar\n" | systemd-firstboot --root="$ROOT" --prompt-locale grep -q "LANG=foo" "$ROOT$LOCALE_PATH" grep -q "LC_MESSAGES=bar" "$ROOT$LOCALE_PATH" -echo -ne "\nfoo\n" | systemd-firstboot --root="$ROOT" --prompt-keymap -grep -q "KEYMAP=foo" "$ROOT/etc/vconsole.conf" +# systemd-firstboot in prompt-keymap mode requires keymaps to be installed so +# it can present them as a list to the user. As Debian does not ship/provide +# compatible keymaps (from the kbd package), skip this test if the keymaps are +# missing. +if [ -d "/usr/share/keymaps/" ] || [ -d "/usr/share/kbd/keymaps/" ] || [ -d "/usr/lib/kbd/keymaps/" ] ; then + echo -ne "\nfoo\n" | systemd-firstboot --root="$ROOT" --prompt-keymap + grep -q "KEYMAP=foo" "$ROOT/etc/vconsole.conf" +fi echo -ne "\nEurope/Berlin\n" | systemd-firstboot --root="$ROOT" --prompt-timezone readlink "$ROOT/etc/localtime" | grep -q "Europe/Berlin$" echo -ne "\nfoobar\n" | systemd-firstboot --root="$ROOT" --prompt-hostname