switch off keyboard
This commit is contained in:
parent
ff1e24ce03
commit
bdf1337376
1 changed files with 27 additions and 16 deletions
|
|
@ -45,18 +45,26 @@ sub run {
|
|||
my $user = get_var("TESTLOGIN", "rhood");
|
||||
my $password = get_var("TESTPASSWORD", "nottingham");
|
||||
|
||||
my $locale_check = 0;
|
||||
|
||||
# Switch to the serial console. To run commands successfully,
|
||||
# we need to load english keyboard layout. Otherwise, we cannot
|
||||
# run commands correctly. Note, that the loadkeys command must
|
||||
# be presented in the foreign layout.
|
||||
$self->root_console(tty => 3);
|
||||
console_loadkeys_us();
|
||||
assert_script_run("chmod 666 /dev/${serialdev}");
|
||||
|
||||
# Check that system locale are set to Czech (cs_CZ.UTF-8)
|
||||
assert_script_run("grep -x 'LANG=cs_CZ.UTF-8' /etc/locale.conf");
|
||||
assert_script_run("localectl status | grep -E 'System Locale:.*LANG=cs_CZ\.UTF-8'");
|
||||
assert_script_run('localectl status | grep -E "VC Keymap: cz"');
|
||||
# If locale_check is off, only record info and skip checking.
|
||||
if ($locale_check == 0) {
|
||||
record_info("Language and keyboard layout checks are switched off!");
|
||||
}
|
||||
else {
|
||||
console_loadkeys_us();
|
||||
# Check that system locale are set to Czech (cs_CZ.UTF-8)
|
||||
assert_script_run("grep -x 'LANG=cs_CZ.UTF-8' /etc/locale.conf");
|
||||
assert_script_run("localectl status | grep -E 'System Locale:.*LANG=cs_CZ\.UTF-8'");
|
||||
assert_script_run('localectl status | grep -E "VC Keymap: cz"');
|
||||
}
|
||||
|
||||
# Check that the time zone has been set to Bratislave, Europe
|
||||
assert_cmd_output_eq(q{timedatectl show -p Timezone --value}, 'Europe/Bratislava');
|
||||
|
|
@ -82,17 +90,20 @@ sub run {
|
|||
|
||||
# Do not check for keyboard layout and locales because
|
||||
# this type of setting is currently disabled in G-I-S.
|
||||
record_info("Language and keyboard layout checks are switched off!");
|
||||
# Uncomment, if this changes
|
||||
# Check that keyboard layout and the locales are correct in user space
|
||||
#assert_as_user_matches($user,
|
||||
# q{gsettings get org.gnome.desktop.input-sources sources},
|
||||
# qr/\('xkb',\s*'cz'\)/
|
||||
#);
|
||||
#assert_as_user_matches($user,
|
||||
# q{locale},
|
||||
# qr/^LANG=cs_CZ\.UTF-8$/m
|
||||
#);
|
||||
if ($locale_check == 0) {
|
||||
record_info("Language and keyboard layout checks are switched off!");
|
||||
}
|
||||
else {
|
||||
# Check that keyboard layout and the locales are correct in user space
|
||||
assert_as_user_matches($user,
|
||||
q{gsettings get org.gnome.desktop.input-sources sources},
|
||||
qr/\('xkb',\s*'cz'\)/
|
||||
);
|
||||
assert_as_user_matches($user,
|
||||
q{locale},
|
||||
qr/^LANG=cs_CZ\.UTF-8$/m
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
# Check that automatic reporting is disabled.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue