From 76aa28fc71b7ca57e33d9234026c460d025abaed Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 25 Jan 2023 09:13:37 +0100 Subject: [PATCH] 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 --- test/units/testsuite-74.firstboot.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.30.2