From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, gua.guo@intel.com
Cc: Sean Brogan <sean.brogan@microsoft.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH] .azurepipelines: Skip CodeCoverage if coverage.xml not found
Date: Thu, 5 Jan 2023 20:40:48 -0500 [thread overview]
Message-ID: <42e79b2d-e5ee-3092-cf0b-165a198eb9e0@linux.microsoft.com> (raw)
In-Reply-To: <4f8e95f65b608131ac7645cc3824624e913954fd.1672965793.git.gua.guo@intel.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
On 1/5/2023 7:44 PM, Guo, Gua wrote:
> From: Gua Guo <gua.guo@intel.com>
>
> Skip CodeCoverage if coverage.xml not found
>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Michael Kubacki <mikuback@linux.microsoft.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Gua Guo <gua.guo@intel.com>
> ---
> .azurepipelines/templates/pr-gate-build-job.yml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/.azurepipelines/templates/pr-gate-build-job.yml b/.azurepipelines/templates/pr-gate-build-job.yml
> index 840852b606..fff61a3193 100644
> --- a/.azurepipelines/templates/pr-gate-build-job.yml
> +++ b/.azurepipelines/templates/pr-gate-build-job.yml
> @@ -100,16 +100,24 @@ jobs:
> buildType: 'current'
>
> targetPath: '$(Build.ArtifactStagingDirectory)'
>
>
>
> + - powershell: Write-Host "##vso[task.setvariable variable=is_code_coverage]0"
>
> + displayName: Give default value for whether CodeCoverage or not
>
> +
>
> + - powershell: if (Test-Path -Path $(Build.ArtifactStagingDirectory)/**/coverage.xml) {Write-Host "##vso[task.setvariable variable=is_code_coverage]1"}
>
> + displayName: Check coverage.xml exist or not
>
> +
>
> - task: CmdLine@2
>
> displayName: Create code coverage report
>
> inputs:
>
> script: |
>
> dotnet tool install -g dotnet-reportgenerator-globaltool
>
> reportgenerator -reports:$(Build.ArtifactStagingDirectory)/**/coverage.xml -targetdir:$(Build.ArtifactStagingDirectory)/Coverage -reporttypes:Cobertura -filefilters:-*Build*;-*UnitTest*;-*Mock*;-*usr*
>
> + condition: eq(variables.is_code_coverage, 1)
>
>
>
> - task: PublishCodeCoverageResults@1
>
> displayName: 'Publish code coverage'
>
> inputs:
>
> codeCoverageTool: Cobertura
>
> summaryFileLocation: '$(Build.ArtifactStagingDirectory)/Coverage/Cobertura.xml'
>
> + condition: eq(variables.is_code_coverage, 1)
>
>
>
prev parent reply other threads:[~2023-01-06 1:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 0:44 [PATCH] .azurepipelines: Skip CodeCoverage if coverage.xml not found Guo, Gua
2023-01-06 1:04 ` [edk2-devel] " Sean
2023-01-06 1:16 ` Michael D Kinney
2023-01-06 1:40 ` Michael Kubacki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42e79b2d-e5ee-3092-cf0b-165a198eb9e0@linux.microsoft.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox