[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/8] tests: Make sure LANG is set properly for iso9660_test
From: |
Glenn Washburn |
Subject: |
[PATCH 1/8] tests: Make sure LANG is set properly for iso9660_test |
Date: |
Sun, 14 Mar 2021 21:20:16 -0500 |
LANG must be set to something that supports international characters,
otherwise xorriso will refuse to include the file with name having
international characters, causing the test to fail. So if LANG is not set,
set it to en_US.UTF-8, a very common UTF-8 locale. And if it is set, but
does not look like a UTF-8 locale, print a warning so the user will have a
clue as to why the iso9660_test might be failing.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
tests/iso9660_test.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/iso9660_test.in b/tests/iso9660_test.in
index 571b938d7..37b1d30af 100644
--- a/tests/iso9660_test.in
+++ b/tests/iso9660_test.in
@@ -7,6 +7,12 @@ if ! which xorriso >/dev/null 2>&1; then
exit 77
fi
+if [ -z "$LANG" ]; then
+ export LANG=en_US.UTF-8
+elif [ -n "${LANG##*UTF*}" ]; then
+ echo "WARNING: LANG=$LANG appears to not be unicode, international file
test may fail."
+fi
+
"@builddir@/grub-fs-tester" joliet
"@builddir@/grub-fs-tester" rockridge
"@builddir@/grub-fs-tester" rockridge_joliet
--
2.27.0
- [PATCH 0/8] Various fixes/improvements for tests, Glenn Washburn, 2021/03/14
- [PATCH 1/8] tests: Make sure LANG is set properly for iso9660_test,
Glenn Washburn <=
- [PATCH 4/8] tests: Fail immediately when grub-shell fails and do not occlude the error code, Glenn Washburn, 2021/03/14
- [PATCH 2/8] tests: Fix partmap_test for arm*-efi, disk numbering has changed, Glenn Washburn, 2021/03/14
- [PATCH 6/8] tests: A failure of mktemp should cause the test script to exit with code 99, Glenn Washburn, 2021/03/14
- [PATCH 7/8] tests: Exit with skipped exit code when test not performed, Glenn Washburn, 2021/03/14
- [PATCH 3/8] tests: When checking squashfs fstime, use superblock last modified time, Glenn Washburn, 2021/03/14
- [PATCH 5/8] tests: Make setup errors in grub-fs-tester hard errors, Glenn Washburn, 2021/03/14
- [PATCH 8/8] tests: Use @BUILD_SHEBANG@ autoconf var instead of literal shell, Glenn Washburn, 2021/03/14