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(); diff --git a/src/test/meson.build b/src/test/meson.build index 7b4df45aac..b22413029d 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -13,7 +13,6 @@ test_include_dir = include_directories('.') path = run_command(sh, '-c', 'echo "$PATH"').stdout().strip() test_env = environment() -test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map) test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map) test_env.set('PATH', project_build_root + ':' + path) diff --git a/test/meson.build b/test/meson.build index a5bfbb7462..1d63c0c038 100644 --- a/test/meson.build +++ b/test/meson.build @@ -36,6 +36,9 @@ if install_tests install_subdir('testsuite-63.units', install_dir : testdata_dir) + install_data(kbd_model_map, + install_dir : testdata_dir + '/test-keymap-util') + testsuite08_dir = testdata_dir + '/testsuite-08.units' install_data('testsuite-08.units/-.mount', install_dir : testsuite08_dir) diff --git a/test/test-keymap-util/kbd-model-map b/test/test-keymap-util/kbd-model-map new file mode 120000 index 0000000000..3e7c928b26 --- /dev/null +++ b/test/test-keymap-util/kbd-model-map @@ -0,0 +1 @@ +../../src/locale/kbd-model-map \ No newline at end of file