[PATCH 1/4] testsuite: add test for locale generation

3 views
Skip to first unread message

Felix Moessbauer

unread,
Sep 15, 2026, 5:33:10 AMSep 15
to isar-...@googlegroups.com, jan.k...@siemens.com, Felix Moessbauer
Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
testsuite/citest.py | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index f011b13c..7d554169 100644
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -116,6 +116,47 @@ class DevTest(CIBaseTest):
self.vm_start('amd64', 'bookworm', image='isar-image-ci')


+class LocaleTest(CIBaseTest):
+
+ """
+ Test locale generation
+
+ :avocado: tags=locale,fast
+ """
+
+ def test_locale(self):
+ """
+ :avocado: tags=startvm
+ """
+ targets = [
+ 'mc:qemuamd64-trixie:isar-image-ci',
+ ]
+
+ self.init()
+ self.perform_build_test(
+ targets,
+ image_install='',
+ lines=[
+ 'IMAGE_PREINSTALL += "console-setup"',
+ 'LOCALE_GEN = "en_US.UTF-8 UTF-8\\nde_DE.UTF-8 UTF-8"',
+ 'LOCALE_DEFAULT = "de_DE.UTF-8"',
+ ],
+ )
+ # de_DE.UTF-8 must be generated, while the non-UTF-8 en_US locale
+ # (listed as the bare "en_US" by locale -a) must not be. Force LC_ALL=C
+ # so locale(1) does not warn about the SSH-forwarded client locale.
+ self.vm_start(
+ 'amd64',
+ 'trixie',
+ image='isar-image-ci',
+ cmd=(
+ "export LC_ALL=C; "
+ "locale -a | grep -qi 'de_DE' && "
+ "! locale -a | grep -qx 'en_US'"
+ ),
+ )
+
+
class CompatTest(CIBaseTest):
"""
Test compilation of recipes for compat architecture.
--
2.55.0

Reply all
Reply to author
Forward
0 new messages