[edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC

Guo, Gua gua.guo at intel.com
Thu Sep 22 17:17:26 UTC 2022


Is it installed by default in Azure Pipelines Windows agents?
Ans: I think no.

For local developer use cases in Windows, don’t we need to make sure stuart tools install OpenCppCoverage as an external dependency?
Ans: I don't find a good way to auto download and auto install OpenCppCoverage, so choose below way to support it.

So currently use CODE_COVERAGE=TRUE to optional enable it, if want to enable it have below requirement.

For VS2019
  Step1. Download and install https://github.com/OpenCppCoverage/OpenCppCoverage/tags
  Step2. pip install pycobertura
  Step3. stuart_ci_build -c .pytool/CISettings.py -a X64 TOOL_CHAIN_TAG=VS2019 -p MdePkg CODE_COVERAGE=TRUE CC_HTML=TRUE

For GCC5
  Step1. sudo apt-get install -y lcov
  Step2. pip install lcov_cobertura
  Step3. pip install pycobertura
  Step4. stuart_ci_build -c .pytool/CISettings.py -a X64 TOOL_CHAIN_TAG=GCC5 -p MdePkg CODE_COVERAGE=TRUE CC_HTML=TRUE

Thanks,
Gua

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney at intel.com> 
Sent: Friday, September 23, 2022 12:15 AM
To: Guo, Gua <gua.guo at intel.com>; devel at edk2.groups.io
Cc: Sean Brogan <sean.brogan at microsoft.com>
Subject: RE: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC

This change adds a dependency on OpenCppCoverage.

However, I do not see any updates to make sure OpenCppCovergae is installed.
Is it installed by default in Azure Pipelines Windows agents?

For local developer use cases in Windows, don’t we need to make sure stuart tools install OpenCppCoverage as an external dependency?

Thanks,

Mike


> -----Original Message-----
> From: Guo, Gua <gua.guo at intel.com>
> Sent: Thursday, September 22, 2022 12:13 AM
> To: devel at edk2.groups.io; Guo, Gua <gua.guo at intel.com>
> Cc: Kinney, Michael D <michael.d.kinney at intel.com>; Sean Brogan 
> <sean.brogan at microsoft.com>
> Subject: RE: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add 
> code coverage support for GCC
> 
> It's PR based on the patch. Have any concern, please also share for me.
> https://github.com/tianocore/edk2/pull/3349
> 
> Thanks,
> Gua
> 
> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Guo, 
> Gua
> Sent: Thursday, September 22, 2022 3:09 PM
> To: devel at edk2.groups.io
> Cc: Guo, Gua <gua.guo at intel.com>
> Subject: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code 
> coverage support for GCC
> 
> From: Gua Guo <gua.guo at intel.com>
> 
> V1: Add coverage option for GCC
> V2: Add ReadMe.md for how to generate coverage report
> V3: Add VS2019 and GCC code coverage support
> 
> Gua Guo (2):
>   UnitTestFrameworkPkg: Add code coverage support for GCC
>   BaseTools/Plugin: Add coverage support for Unit Test
> 
>  .../HostBasedUnitTestRunner.py                | 124 ++++++++++++++++++
>  UnitTestFrameworkPkg/ReadMe.md                |  42 +++++-
>  .../UnitTestFrameworkPkg.ci.yaml              |   2 +
>  .../UnitTestFrameworkPkgHost.dsc.inc          |   3 +-
>  4 files changed, 167 insertions(+), 4 deletions(-)
> 
> --
> 2.31.1.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94124): https://edk2.groups.io/g/devel/message/94124
Mute This Topic: https://groups.io/mt/93843728/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list