[EXTERNAL] [edk2-discuss] failure in building unit test locally

Andrew Fish

On Jul 27, 2021, at 9:17 AM, Bret Barkelew via groups.io <bret.barkelew@...> wrote:

Thanks for your follow-up. This is a known limitation that we have worked to resolve but ran into some unknown/unexpected errors. We definitely want to support both traditional and simplified character sets (as well as any other character sets), but if I recall there were some ambiguous OS mechanisms at work.

We would appreciate any help or contributions to get these character sets supported, but I understand if you don’t have the time.

So there is no way decode() locale.getpreferredencoding() to UTF-8?

I hit some issues post processing edk2 git-grep output in Python and I fixed that via:

Basically just force the errors to be ignored?

Is the problem the data is not encoded with the same default as the OS, so Python can’t figure it out?


Andrew Fish

I thought we already had an issue open to track it, but I couldn’t find it so I created a new one here:
Support non-ASCII character sets in Stuart tools · Issue #267 · tianocore/edk2-pytool-extensions (github.com)<https://github.com/tianocore/edk2-pytool-extensions/issues/267>

We can mark it as a duplicate if I find the original report.

- Bret

From: wenyi,xie via groups.io<mailto:xiewenyi2@...>
Sent: Monday, July 26, 2021 12:53 AM
To: Sean Brogan<mailto:spbrogan@...>; discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>
Subject: [EXTERNAL] Re: [edk2-discuss] failure in building unit test locally

Hi, everyone

I have found the root cause of failure, it's because the language in my windows is Chinese, and the software not support Unicode will use gbk as the coding format.
After I change the language, the problem is solved.


On 2021/7/21 10:56, xiewenyi (A) wrote:

I have upload the log to github, link is like below.


On 2021/7/20 23:26, Sean Brogan wrote:
In the workspace/build folder there should be some logs .
Can you look at those and/or send the CI Log?


On 7/20/2021 2:08 AM, wenyi,xie via groups.io wrote:
Hello, everyone

I want to build unit test locally, my environment is win10, python 3.9.6, VS2019.
I excute the command according to steps in the ReadMe.
1. stuart_setup -c ./.pytool/CISettings.py TOOL_CHAIN_TAG=VS2019
2. stuart_update -c ./.pytool/CISettings.py TOOL_CHAIN_TAG=VS2019
3. stuart_ci_build -c ./.pytool/CISettings.py TOOL_CHAIN_TAG=VS2019 -t NOOPT -p MdePkg

In step 3, the log is just stopped at "Running Build NOOPT", how do I know the cause of the build failure ?
WARNING - Using Pip Tools based BaseTools
SECTION - Loading Plugins
SECTION - Start Invocable Tool
SECTION - Getting Environment
SECTION - Loading plugins
SECTION - Building MdePkg Package
PROGRESS - --Running MdePkg: Host Unit Test Compiler Plugin NOOPT --
WARNING - Allowing Override for key TARGET_ARCH
PROGRESS - Start time: 2021-07-20 16:55:27.953832
PROGRESS - Setting up the Environment
PROGRESS - Running Pre Build
PROGRESS - Running Build NOOPT