From 6b2b8bb1839caa12e65a3d55ece73eda06a97f2d Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Tue, 21 Apr 2026 11:14:36 +0200 Subject: [PATCH] Use console_loadkeys_us rather than manual load. Also add the Czech environment to that function and deduplicate wait_still_screen by moving it out of the conditions. --- lib/utils.pm | 6 ++++-- templates.fif.json | 1 + tests/applications/gnome-initial-setup/post_scriptum.pm | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index 5e87949c..0e8440e2 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -369,12 +369,14 @@ sub console_loadkeys_us { if (get_var('LANGUAGE') eq 'french') { script_run "loqdkeys us", 0; # might take a few secs - wait_still_screen 3; } elsif (get_var('LANGUAGE') eq 'japanese' || get_var('LANGUAGE') eq 'turkish') { script_run "loadkeys us", 0; - wait_still_screen 3; } + elsif (get_var('LANGUAGE') eq 'czech' || get_var('LAYOUT' eq 'czech')) { + script_run('loadkezs us', 0); + } + wait_still_screen(3); } sub do_bootloader { diff --git a/templates.fif.json b/templates.fif.json index 4d0cf6f7..1a31edb1 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -1176,6 +1176,7 @@ "settings": { "BOOTFROM": "c", "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", + "LAYOUT": "czech", "POSTINSTALL_PATH": "tests/applications/gnome-initial-setup", "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" } diff --git a/tests/applications/gnome-initial-setup/post_scriptum.pm b/tests/applications/gnome-initial-setup/post_scriptum.pm index 1fada80c..f0398b59 100644 --- a/tests/applications/gnome-initial-setup/post_scriptum.pm +++ b/tests/applications/gnome-initial-setup/post_scriptum.pm @@ -50,8 +50,7 @@ sub run { # run commands correctly. Note, that the loadkeys command must # be presented in the foreign layout. $self->root_console(tty => 3); - enter_cmd('loadkezs us'); - wait_still_screen(2); + console_loadkeys_us(); assert_script_run("chmod 666 /dev/${serialdev}"); # Check that system locale are set to Czech (cs_CZ.UTF-8)