diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-03 17:40:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-04 17:02:10 +0000 |
commit | 8e035db1e5f05edc00fb903673b4bffe73144629 (patch) | |
tree | 023d424672b36f8701939f3a0940913983d41036 /meta | |
parent | 1d8e6b0f9888feadfd6106e6aa651cbab562b133 (diff) | |
download | poky-8e035db1e5f05edc00fb903673b4bffe73144629.tar.gz |
oeqa/selftest/locales: Add test for disabled binary locale generation
Similarly to the recently added test for binary generated locales, add
a version to test on target locale generation. This was broken but should
be fixed now so we can add the test sharing code from the previous test.
(From OE-Core rev: 50a29c167eb9fe9fa96aa53a379ae7597cefd1cc)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/locales.py | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/meta/lib/oeqa/selftest/cases/locales.py b/meta/lib/oeqa/selftest/cases/locales.py index 433991abf9..4ca8ffb7aa 100644 --- a/meta/lib/oeqa/selftest/cases/locales.py +++ b/meta/lib/oeqa/selftest/cases/locales.py | |||
@@ -9,23 +9,17 @@ from oeqa.utils.commands import bitbake, runqemu | |||
9 | class LocalesTest(OESelftestTestCase): | 9 | class LocalesTest(OESelftestTestCase): |
10 | 10 | ||
11 | @OETestTag("runqemu") | 11 | @OETestTag("runqemu") |
12 | def test_locales_on(self): | ||
13 | """ | ||
14 | Summary: Test the locales are generated | ||
15 | Expected: 1. Check the locale exist in the locale-archive | ||
16 | 2. Check the locale exist for the glibc | ||
17 | 3. Check the locale can be generated | ||
18 | Product: oe-core | ||
19 | Author: Louis Rannou <lrannou@baylibre.com> | ||
20 | AutomatedBy: Louis Rannou <lrannou@baylibre.com> | ||
21 | """ | ||
22 | 12 | ||
13 | def run_locales_test(self, binary_enabled): | ||
23 | features = [] | 14 | features = [] |
24 | features.append('EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password allow-root-login"') | 15 | features.append('EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password allow-root-login"') |
25 | features.append('IMAGE_INSTALL:append = " glibc-utils localedef"') | 16 | features.append('IMAGE_INSTALL:append = " glibc-utils localedef"') |
26 | features.append('GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8"') | 17 | features.append('GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8"') |
27 | features.append('IMAGE_LINGUAS:append = " en-us fr-fr"') | 18 | features.append('IMAGE_LINGUAS:append = " en-us fr-fr"') |
28 | features.append('ENABLE_BINARY_LOCALE_GENERATION = "1"') | 19 | if binary_enabled: |
20 | features.append('ENABLE_BINARY_LOCALE_GENERATION = "1"') | ||
21 | else: | ||
22 | features.append('ENABLE_BINARY_LOCALE_GENERATION = "0"') | ||
29 | self.write_config("\n".join(features)) | 23 | self.write_config("\n".join(features)) |
30 | 24 | ||
31 | # Build a core-image-minimal | 25 | # Build a core-image-minimal |
@@ -43,3 +37,18 @@ class LocalesTest(OESelftestTestCase): | |||
43 | # output must includes fr_FR.utf8 | 37 | # output must includes fr_FR.utf8 |
44 | self.assertEqual(status, 1, msg='localedef test command failed: output: %s' % output) | 38 | self.assertEqual(status, 1, msg='localedef test command failed: output: %s' % output) |
45 | self.assertIn("fr_FR.utf8", output, msg='localedef test failed: output: %s' % output) | 39 | self.assertIn("fr_FR.utf8", output, msg='localedef test failed: output: %s' % output) |
40 | |||
41 | def test_locales_on(self): | ||
42 | """ | ||
43 | Summary: Test the locales are generated | ||
44 | Expected: 1. Check the locale exist in the locale-archive | ||
45 | 2. Check the locale exist for the glibc | ||
46 | 3. Check the locale can be generated | ||
47 | Product: oe-core | ||
48 | Author: Louis Rannou <lrannou@baylibre.com> | ||
49 | AutomatedBy: Louis Rannou <lrannou@baylibre.com> | ||
50 | """ | ||
51 | self.run_locales_test(True) | ||
52 | |||
53 | def test_locales_off(self): | ||
54 | self.run_locales_test(False) | ||