public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
       [not found] <17171D11E1CE1FDF.32370@groups.io>
@ 2022-09-22  7:12 ` Guo, Gua
  2022-09-22 16:14   ` Michael D Kinney
  0 siblings, 1 reply; 5+ messages in thread
From: Guo, Gua @ 2022-09-22  7:12 UTC (permalink / raw)
  To: devel@edk2.groups.io, Guo, Gua; +Cc: Kinney, Michael D, Sean Brogan

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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guo, Gua
Sent: Thursday, September 22, 2022 3:09 PM
To: devel@edk2.groups.io
Cc: Guo, Gua <gua.guo@intel.com>
Subject: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC

From: Gua Guo <gua.guo@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







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
  2022-09-22  7:12 ` [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC Guo, Gua
@ 2022-09-22 16:14   ` Michael D Kinney
  2022-09-22 17:17     ` Guo, Gua
  0 siblings, 1 reply; 5+ messages in thread
From: Michael D Kinney @ 2022-09-22 16:14 UTC (permalink / raw)
  To: Guo, Gua, devel@edk2.groups.io; +Cc: Sean Brogan

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@intel.com>
> Sent: Thursday, September 22, 2022 12:13 AM
> To: devel@edk2.groups.io; Guo, Gua <gua.guo@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guo, Gua
> Sent: Thursday, September 22, 2022 3:09 PM
> To: devel@edk2.groups.io
> Cc: Guo, Gua <gua.guo@intel.com>
> Subject: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
> 
> From: Gua Guo <gua.guo@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
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
  2022-09-22 16:14   ` Michael D Kinney
@ 2022-09-22 17:17     ` Guo, Gua
  2022-09-22 18:20       ` Michael D Kinney
  2022-09-22 18:24       ` Michael D Kinney
  0 siblings, 2 replies; 5+ messages in thread
From: Guo, Gua @ 2022-09-22 17:17 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sean Brogan

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@intel.com> 
Sent: Friday, September 23, 2022 12:15 AM
To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@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@intel.com>
> Sent: Thursday, September 22, 2022 12:13 AM
> To: devel@edk2.groups.io; Guo, Gua <gua.guo@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan 
> <sean.brogan@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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guo, 
> Gua
> Sent: Thursday, September 22, 2022 3:09 PM
> To: devel@edk2.groups.io
> Cc: Guo, Gua <gua.guo@intel.com>
> Subject: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code 
> coverage support for GCC
> 
> From: Gua Guo <gua.guo@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
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
  2022-09-22 17:17     ` Guo, Gua
@ 2022-09-22 18:20       ` Michael D Kinney
  2022-09-22 18:24       ` Michael D Kinney
  1 sibling, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2022-09-22 18:20 UTC (permalink / raw)
  To: Guo, Gua, devel@edk2.groups.io, Kinney, Michael D; +Cc: Sean Brogan

Gua,

You may be able to use chocolatey to install opencppcoverage:

	https://community.chocolatey.org/packages/opencppcoverage

We have used it for some other dependencies such as QEMU:

	https://github.com/tianocore/edk2/blob/b328bb54c6e5510bc687302e4b717694bd441891/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml#L137

We also have the option of putting it in a nuget feed.

Mike


> -----Original Message-----
> From: Guo, Gua <gua.guo@intel.com>
> Sent: Thursday, September 22, 2022 10:17 AM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Subject: RE: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
> 
> 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@intel.com>
> Sent: Friday, September 23, 2022 12:15 AM
> To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@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@intel.com>
> > Sent: Thursday, September 22, 2022 12:13 AM
> > To: devel@edk2.groups.io; Guo, Gua <gua.guo@intel.com>
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan
> > <sean.brogan@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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guo,
> > Gua
> > Sent: Thursday, September 22, 2022 3:09 PM
> > To: devel@edk2.groups.io
> > Cc: Guo, Gua <gua.guo@intel.com>
> > Subject: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code
> > coverage support for GCC
> >
> > From: Gua Guo <gua.guo@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
> >
> >
> >
> > 
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
  2022-09-22 17:17     ` Guo, Gua
  2022-09-22 18:20       ` Michael D Kinney
@ 2022-09-22 18:24       ` Michael D Kinney
  1 sibling, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2022-09-22 18:24 UTC (permalink / raw)
  To: Guo, Gua, devel@edk2.groups.io, Kinney, Michael D; +Cc: Sean Brogan

Gua,

Also for the pip modules, do we want to add them to edk2/pip-requirements.txt so
default config for local development includes these additional components that
can be used when running unit tests based on edk2/UnitTestFrameworkPkg?

Thanks,

Mike

> -----Original Message-----
> From: Guo, Gua <gua.guo@intel.com>
> Sent: Thursday, September 22, 2022 10:17 AM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Subject: RE: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC
> 
> 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@intel.com>
> Sent: Friday, September 23, 2022 12:15 AM
> To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@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@intel.com>
> > Sent: Thursday, September 22, 2022 12:13 AM
> > To: devel@edk2.groups.io; Guo, Gua <gua.guo@intel.com>
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan
> > <sean.brogan@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@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Guo,
> > Gua
> > Sent: Thursday, September 22, 2022 3:09 PM
> > To: devel@edk2.groups.io
> > Cc: Guo, Gua <gua.guo@intel.com>
> > Subject: [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code
> > coverage support for GCC
> >
> > From: Gua Guo <gua.guo@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
> >
> >
> >
> > 
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-22 18:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <17171D11E1CE1FDF.32370@groups.io>
2022-09-22  7:12 ` [edk2-devel] [PATCH v3 0/2] UnitTestFrameworkPkg: Add code coverage support for GCC Guo, Gua
2022-09-22 16:14   ` Michael D Kinney
2022-09-22 17:17     ` Guo, Gua
2022-09-22 18:20       ` Michael D Kinney
2022-09-22 18:24       ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox