From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.10230.1682558414048367256 for ; Wed, 26 Apr 2023 18:20:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=KtRrHpLx; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 0A7A021C33CA; Wed, 26 Apr 2023 18:20:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0A7A021C33CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682558413; bh=QuM0nLzCHnSTayhtctk6iX94PDbatBrcn+0R9B5G7HM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KtRrHpLxPfdoprjsawA/jyTsKjWVlH3tU1A5lconA+r4KwHuBjAxF7o2YVSgUdiz4 QETXAdxYbZT3dS/m0uiDGva9lJTMZbUqdSlIXo38ob70iWoZ9d8tsuRKJpw9871TSg 8SMuVU6YWz74XbrWJkRBL0wDGoIKIRoG6qfgNi8o= Message-ID: Date: Wed, 26 Apr 2023 21:20:11 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [edk2-devel] [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure To: devel@edk2.groups.io, gua.guo@intel.com Cc: Michael D Kinney , Sean Brogan References: <20230427003416.315-1-gua.guo@intel.com> From: "Michael Kubacki" In-Reply-To: <20230427003416.315-1-gua.guo@intel.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reviewed-by: Michael Kubacki On 4/26/2023 8:34 PM, Guo, Gua wrote: > From: Gua Guo > > If code coverage exist failure, CI/CD need to catch it > > Cc: Michael D Kinney > Cc: Sean Brogan > Cc: Michael Kubacki > Signed-off-by: Gua Guo > --- > .../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 a384b55629..d993de9412 100644 > --- a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py > +++ b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py > @@ -130,9 +130,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.") > > >