From: Xiangyu Chen <xiangyu.c...@windriver.com> Bash has a test case that needs ja_JP shift jis locale.
It will check current system has ja_JP.SJIS locale or not, but in yocto, this locale named ja_JP.shiftjis, they are the same. So create a locale alias, making ja_JP.SJIS link to ja_JP.shiftjis. Also add warning message if current system doesn't contain shift jis locale. Signed-off-by: Xiangyu Chen <xiangyu.c...@windriver.com> --- meta/recipes-extended/bash/bash/run-ptest | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest index 738ad3c42c..3cafb5e2ea 100644 --- a/meta/recipes-extended/bash/bash/run-ptest +++ b/meta/recipes-extended/bash/bash/run-ptest @@ -3,6 +3,7 @@ en_US=`locale -a | grep en_US*` fr_FR=`locale -a | grep fr_FR*` de_DE=`locale -a | grep de_DE*` +ja_JP_SJIS=`locale -a | grep ja_JP.shiftjis` if [ -z "$en_US" ] then @@ -19,8 +20,28 @@ then echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it." fi +if [ -z "$ja_JP_SJIS" ] +then + echo "Warning: The ja_JP.shiftjis locales is needed to run the intl.tests, please add it." +else +# Yocto generated shiftjis locale named ja_JP.shiftjis, but bash's test script using ja_JP.SJIS +# They are the same one, so add an alias in locale.alias + if [ -f /usr/share/locale/locale.alias ] + then + cp /usr/share/locale/locale.alias /usr/share/locale/locale.alias.bak + fi + + echo "ja_JP.SJIS ja_JP.shiftjis" >> /usr/share/locale/locale.alias +fi + + useradd bashtest chown -R bashtest:bashtest tests setpriv --reuid bashtest --rgid bashtest --clear-groups --reset-env $(dirname "$0")/run-bash-ptests chown -R root:root tests userdel -r bashtest + +if [ -f /usr/share/locale/locale.alias.bak ] +then + mv /usr/share/locale/locale.alias.bak /usr/share/locale/locale.alias +fi -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#196244): https://lists.openembedded.org/g/openembedded-core/message/196244 Mute This Topic: https://lists.openembedded.org/mt/104599698/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-