| Summary: | Add test that locales are working | ||
|---|---|---|---|
| Product: | [QA/Testing] Runtime Testing | Reporter: | Ross Burton <ross.burton> |
| Component: | general | Assignee: | New Comer Bugs <newcomer> |
| Status: | RESOLVED FIXED | QA Contact: | Apoorv <apoorv.sangal> |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | costamagnagianfranco, jose.perez.carranza, leonardo.sandoval.gonzalez, louis.rannou, randy.macleod, sangeeta.jain, yoctouser |
| Version: | 2.5 | ||
| Target Milestone: | 5.99 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | NEWCOMER | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Ross Burton
2016-02-05 13:43:32 UTC
Due to limited resources, moving this to 2.3 (In reply to comment #0) > Basically we need to test that locales are working, both generated on first > boot and build time. > > IMAGE_LINGUAS="en-us fr-fr" > ENABLE_BINARY_LOCALE_GENERATION="0" > MACHINE=qemuarm > bitbake core-image-base > > boot up, ssh in and do (handwavy) something that uses translated strings and > won't change. A reasonable suggestion was LANG=fr_FR df | head -n1. Check > that the string is in fact in French. > > Then do that again with ENABLE_BINARY_LOCALE_GENERATION="1". Using > MACHINE=qemuarm is important as we want to make sure that the host and > target architectures are not compatible. I followed the steps mentioned above and still seeing the string in English, there is any extra configuration needed or locales are not working properly? Ross, please review and close if complete. If the "df" command is from BusyBox (v1.24.1), translation doesn't work. Avoid to use tools from BusyBox to check if translation works. Please provide a status on this. Will it be ready for YP 2.5 M3? I now see this is targeted for M4. locales have been tested by doing following steps: changes made in local.conf: GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8" IMAGE_LINGUAS += "en-us fr-fr" IMAGE_INSTALL_append +="glibc-utils localedef" ENABLE_BINARY_LOCALE_GENERATION="1" Image generated : bitbake core-image-sato-sdk boot up and run following commands on terminal: # locale -a C POSIX en_US fr_FR # locale LANG= LC_CTYPE = "POSIX" # export LANG=fr.FR.UTF-8 # locale LANG=fr.FR.UTF-8 LC_CTYPE="fr_FR.UTF-8" #LC_TIME=fr_FR.UTF-8 date mer.mars 21 13:54:20 UTC 2018 #LC_TIME=fr_FR.UTF-8 date Wed Mar 21 13:54:45 UTC 2018 We need that, but in an automated test. i will get a runtime automated test case in. I cannot use date because it is also from busybox. But I'm adding a check with localedef: # localedef --list-archive | grep "fr_FR.utf8" I have created a meta/lib/oeqa/runtime/cases/locales.py https://privatebin.net/?eb04f95e2d5a9ba1#5dsY67YYN4swSr5wSF5bsWDCheaxGsXtEuzyXf6PUrGM It requires the local.conf to have: IMAGE_INSTALL:append = " dropbear " IMAGE_FEATURES:append = " empty-root-password allow-empty-password allow-root-login " IMAGE_INSTALL:append = " glibc-utils localedef " INHERIT:append = " testimage " TEST_SUITES = " ping ssh locales " GLIBC_GENERATE_LOCALES = "en_US.UTF-8 fr_FR.UTF-8" IMAGE_LINGUAS="en-us fr-fr" ENABLE_BINARY_LOCALE_GENERATION="1" Is that good or does it require something that automatically set those before running the test ? Thanks! The test should set all the variables that it needs. Have a look at other tests in eg imagefeatures.py as examples. What I have done is a runtime test. As I understand now, it should be placed in selftest instead, right ? Yes, in selftest we control the environment. Do you still require the test when ENABLE_BINARY_LOCALE_GENERATION="0" while this means a complete rebuild (the glibc depends on it) ? Perhaps this is closed with: https://lore.kernel.org/all/20230127153344.2868589-1-lrannou@baylibre.com/ and https://lore.kernel.org/all/20230204114133.1178502-3-richard.purdie@linuxfoundation.org/#t Bulk move from 4.99 or 0.00 to 5.99 Fixed by Louis in: https://git.openembedded.org/openembedded-core/commit/?id=53258fd810bea6475af9f908f7b712a13a02b628 Thanks! |