Skip to content

Commit

Permalink
Introduce code coverage job for matrix build (#333)
Browse files Browse the repository at this point in the history
## Description

Introduce a unified job to process and publish code coverage data.

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Tested in test pipeline

## Integration Instructions

N/A
  • Loading branch information
cfernald authored and kenlautner committed Dec 18, 2023
1 parent e720a80 commit 1183756
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .azurepipelines/Matrix-Build-Job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,14 @@ jobs:
extra_install_step: ${{ parameters.extra_install_step }}
tool_chain_tag: ${{ parameters.tool_chain_tag }}
install_tools: ${{ eq(parameters.container_image, '') }}

- job: PublishCoverage
dependsOn: Build
workspace:
clean: all

pool:
vmImage: 'windows-latest'

steps:
- template: Steps/PublishCodeCoverage.yml@mu_devops
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def gen_code_coverage_gcc(self, thebuilder):
if os.path.isfile(f"{workspace}/Build/coverage.xml"):
os.remove(f"{workspace}/Build/coverage.xml")
ret = RunCmd("lcov_cobertura",f"{workspace}/Build/all-coverage.info --excludes ^.*UnitTest\|^.*MU\|^.*Mock\|^.*DEBUG -o {workspace}/Build/coverage.xml")
if ret != 0:
logging.error("UnitTest Coverage: Failed generate all coverage XML.")
return 1

return 0

Expand Down

0 comments on commit 1183756

Please sign in to comment.