From: Gua Guo <gua....@intel.com> If code coverage exist failure, CI/CD need to catch it
Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Sean Brogan <sean.bro...@microsoft.com> Cc: Michael Kubacki <mikub...@linux.microsoft.com> Signed-off-by: Gua Guo <gua....@intel.com> Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com> Reviewed-by: Michael Kubacki <mikub...@linux.microsoft.com> --- .../HostBasedUnitTestRunner/HostBasedUnitTestRunner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py index 0e013c5f1a..86b6bd36df 100644 --- a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py +++ b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py @@ -117,9 +117,13 @@ class HostBasedUnitTestRunner(IUefiBuildPlugin): 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.") -- 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103689): https://edk2.groups.io/g/devel/message/103689 Mute This Topic: https://groups.io/mt/98531259/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-