Skip to content

Commit

Permalink
BaseTools/Plugin: Report error if code coverage failure
Browse files Browse the repository at this point in the history
If code coverage exist failure, CI/CD need to catch it

Cc: Michael D Kinney <[email protected]>
Cc: Sean Brogan <[email protected]>
Cc: Michael Kubacki <[email protected]>
Signed-off-by: Gua Guo <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
Reviewed-by: Michael Kubacki <[email protected]>
  • Loading branch information
gguo11837463 authored and mergify[bot] committed Apr 27, 2023
1 parent edacc55 commit 9688e23
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,13 @@ def do_post_build(self, thebuilder):

if thebuilder.env.GetValue("CODE_COVERAGE") != "FALSE":
if thebuilder.env.GetValue("TOOL_CHAIN_TAG") == "GCC5":
self.gen_code_coverage_gcc(thebuilder)
ret = self.gen_code_coverage_gcc(thebuilder)
if ret != 0:
failure_count += 1
elif thebuilder.env.GetValue("TOOL_CHAIN_TAG").startswith ("VS"):
self.gen_code_coverage_msvc(thebuilder)
ret = self.gen_code_coverage_msvc(thebuilder)
if ret != 0:
failure_count += 1
else:
logging.info("Skipping code coverage. Currently, support GCC and MSVC compiler.")

Expand Down

0 comments on commit 9688e23

Please sign in to comment.