summaryrefslogtreecommitdiffstats
path: root/src/locale
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2021-05-19 14:14:58 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-02 16:48:55 +0100
commitbe0cc2ce6c947aafadb3f42dba405269f670b31c (patch)
tree87a84668b959196f7434369af6083defb0de58b7 /src/locale
parentman: document cryptenroll limitations (diff)
downloadsystemd-be0cc2ce6c947aafadb3f42dba405269f670b31c.tar.xz
systemd-be0cc2ce6c947aafadb3f42dba405269f670b31c.zip
test-keymap-util: always use kbd-model-map we ship
This test makes assumptions on the availability of some mappings contained in kbd-model-map and therefore strongly relies on the version shipped by upstream. IOW the test is likely to fail if it's installed on a system with a more comprehensive kbd-model-map. This patch makes the upstream kbd-model-map file available via a symlink in test/testdata/test-keymap-util dir and makes sure that this specific version is always used by test-keymap-util regardless of whether the test is installed and run on a different system or directly run (optionally via meson) from the project working dir.
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/test-keymap-util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/locale/test-keymap-util.c b/src/locale/test-keymap-util.c
index 6f60aba38c..a5d40af448 100644
--- a/src/locale/test-keymap-util.c
+++ b/src/locale/test-keymap-util.c
@@ -190,12 +190,17 @@ static void test_x11_convert_to_vconsole(void) {
}
int main(int argc, char **argv) {
+ _cleanup_free_ char *map = NULL;
+
test_setup_logging(LOG_DEBUG);
test_find_language_fallback();
test_find_converted_keymap();
test_find_legacy_keymap();
+ assert_se(get_testdata_dir("test-keymap-util/kbd-model-map", &map) >= 0);
+ assert_se(setenv("SYSTEMD_KBD_MODEL_MAP", map, 1) == 0);
+
test_vconsole_convert_to_x11();
test_x11_convert_to_vconsole();