[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test
From: |
Glenn Washburn |
Subject: |
[PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test |
Date: |
Sat, 19 Dec 2020 04:14:37 -0600 |
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/5] Testing improvements, Glenn Washburn, 2020/12/19
- [PATCH 1/5] tests: Exit with skipped exit code when test not performed, Glenn Washburn, 2020/12/19
- [PATCH 2/5] tests: Make sure LANG is set properly for iso9660_test,
Glenn Washburn <=
- [PATCH 3/5] tests: Make setup errors in grub-fs-tester hard errors, Glenn Washburn, 2020/12/19
- [PATCH 5/5] tests: Comment failing functional tests until we can get them working again, Glenn Washburn, 2020/12/19
- [PATCH 4/5] tests: Fix partmap_test for arm*-efi, disk numbering has changed, Glenn Washburn, 2020/12/19