From: Richard Purdie Date: Mon, 16 Aug 2021 09:15:40 +0000 (+0100) Subject: oeqa/selftest/glibc: Handle incorrect encoding issuesin glibc test results X-Git-Tag: yocto-3.3.4~26 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=4881854f4f154945dc893bb88ed038755bfdfd64;p=openembedded-core.git oeqa/selftest/glibc: Handle incorrect encoding issuesin glibc test results We dont control the test output and sometimes see badly encoded characters. These don't affect the operation of the code we're running. Use errors='replace' to avoid those issues and the resulting test failures. Signed-off-by: Richard Purdie (cherry picked from commit 3939b1923387d3bc440118ed1663d28a03a1ea5d) Signed-off-by: Anuj Mittal --- diff --git a/meta/lib/oeqa/selftest/cases/glibc.py b/meta/lib/oeqa/selftest/cases/glibc.py index c687f6ef93..cf8c92887b 100644 --- a/meta/lib/oeqa/selftest/cases/glibc.py +++ b/meta/lib/oeqa/selftest/cases/glibc.py @@ -33,7 +33,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase): ptestsuite = "glibc-user" if ssh is None else "glibc" self.ptest_section(ptestsuite) - with open(os.path.join(builddir, "tests.sum"), "r") as f: + with open(os.path.join(builddir, "tests.sum"), "r", errors='replace') as f: for test, result in parse_values(f): self.ptest_result(ptestsuite, test, result)