diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2024-10-02 16:54:51 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-30 15:59:58 +0000 |
commit | 77fe18d4f8ec34501045c5d92ce7e13b1bd129e9 (patch) | |
tree | 2315cdd21557dbec298416ac5821151073d5f732 /lib | |
parent | db1f53f73e95499a5f0b0edc45dd9cc9718d3c8a (diff) | |
download | meta-mingw-styhead.tar.gz |
oeqa: Set LANG in wine testsyocto-5.1.4yocto-5.1.3yocto-5.1.2yocto-5.1.1styhead-5.1.4styhead-5.1.3styhead-5.1.2styhead-5.1.1styhead
Glib likes to try and determine the local name using the Windows
GetConsoleOutputCP(), which doesn't work well running under wine in our
test cases (it seems to be linked to stdin not being a terminal).
This results in the error message:
GLib-WARNING (recursed) **: Failed to determine console output code page: Invalid access.. Falling back to UTF-8
and then Glib falls back to the locale "UTF-8", which is invalid and the
program will likely crash.
In particular, pkg-config seems to be sensitive to this on some hosts
(e.g. Ubuntu 24.04)
Set the LANG variable to a valid language to make sure that this
codepath in Glib is not triggered.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oeqa/sdkmingw/context.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oeqa/sdkmingw/context.py b/lib/oeqa/sdkmingw/context.py index 5319223..5869e57 100644 --- a/lib/oeqa/sdkmingw/context.py +++ b/lib/oeqa/sdkmingw/context.py | |||
@@ -40,6 +40,12 @@ class OESDKMinGWTestContext(OESDKTestContext): | |||
40 | # Convenience variables to make test cases easier to write | 40 | # Convenience variables to make test cases easier to write |
41 | env['SDK_DIR'] = getattr(self, 'wine_sdk_dir', '') | 41 | env['SDK_DIR'] = getattr(self, 'wine_sdk_dir', '') |
42 | 42 | ||
43 | # Set the language. If this is not set to a valid language, then | ||
44 | # program that use glib will attempt to determine the language from | ||
45 | # stdin, which results in an error, fallback to "UTF-8" which is | ||
46 | # invalid and crash | ||
47 | env["LANG"] = "C.UTF-8" | ||
48 | |||
43 | return env | 49 | return env |
44 | 50 | ||
45 | def wine_path(self, p): | 51 | def wine_path(self, p): |