test-kernel-install: support the case when custom default locale is specified

This also makes 'diff' command output to stderr, otherwise the
difference is eaten by meson by default, so hard to debug.
This commit is contained in:
Yu Watanabe
2025-10-13 10:31:43 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent d526ab8a9a
commit d1893390e5
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -291,7 +291,7 @@ rmdir "$BOOT_ROOT/hoge"
###########################################
output="$("$kernel_install" -v --json=pretty inspect 1.1.1 "$D/sources/linux")"
diff -u <(echo "$output") - <<EOF
diff -u <(echo "$output") - >&2 <<EOF
{
"MachineID" : "3e0484f3634a418b8e6a39e8828b03e3",
"KernelImageType" : "unknown",
@@ -309,7 +309,7 @@ diff -u <(echo "$output") - <<EOF
"$D/00-skip.install"
],
"PluginEnvironment" : [
"LC_COLLATE=C.UTF-8",
"LC_COLLATE=$SYSTEMD_DEFAULT_LOCALE",
"KERNEL_INSTALL_VERBOSE=1",
"KERNEL_INSTALL_IMAGE_TYPE=unknown",
"KERNEL_INSTALL_MACHINE_ID=3e0484f3634a418b8e6a39e8828b03e3",
+1
View File
@@ -14,6 +14,7 @@ path = run_command(sh, '-c', 'echo "$PATH"', check: true).stdout().strip()
test_env = {
'PATH' : meson.project_build_root() + ':' + path,
'PROJECT_BUILD_ROOT' : meson.project_build_root(),
'SYSTEMD_DEFAULT_LOCALE' : get_option('default-locale'),
'SYSTEMD_SLOW_TESTS' : want_slow_tests ? '1' : '0',
'PYTHONDONTWRITEBYTECODE' : '1',
}