From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.19911.1682212939139101374 for ; Sat, 22 Apr 2023 18:22:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=mTW7eouo; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: gua.guo@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682212939; x=1713748939; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZYCYD5vKQVax89qyIbXn6d3sao7G+h1mKZXfG/6Dgzg=; b=mTW7eouoNJeVT/yNf/D7MvSCJXmhzDNJ/3FO3noevKsFdPtlYzFxkmU/ BAB9vyuz5bFB51BtMuBduX1jezrKyM/jPZXPc5CB8xeKVmmTZFDY+lfv+ vGGpl58wsD1kF91uFehlDnhIEsyTlZrw0T0Q9eAgK2yBh2/7UhUBulVOl RV4ilGfirIAqQ4ob9RbI1FaGQKLIXvl+h0sqsJUBJjrVQv8i4pyfk/KJq fJtGXDFMXnaBlERRUXTkP9q0J5Y8WOc6KRTqzbuKvE5LDiS45JVoYp3s0 tdpbTDNXVFwu7ghr3Rglq2Ravp3Vvf5zW28M+oy4RtrYU7UNX+k3Rg9pW w==; X-IronPort-AV: E=McAfee;i="6600,9927,10688"; a="343708098" X-IronPort-AV: E=Sophos;i="5.99,219,1677571200"; d="scan'208";a="343708098" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2023 18:22:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10688"; a="692644361" X-IronPort-AV: E=Sophos;i="5.99,219,1677571200"; d="scan'208";a="692644361" Received: from gguo-desk.gar.corp.intel.com ([10.5.215.23]) by orsmga002.jf.intel.com with ESMTP; 22 Apr 2023 18:22:17 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: Gua Guo , Michael D Kinney , Sean Brogan , Michael Kubacki Subject: [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure Date: Sun, 23 Apr 2023 09:22:12 +0800 Message-Id: <20230423012213.1472-1-gua.guo@intel.com> X-Mailer: git-send-email 2.39.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/HostBasedUnitTestRunn= er.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): =0D if thebuilder.env.GetValue("CODE_COVERAGE") !=3D "FALSE":=0D if thebuilder.env.GetValue("TOOL_CHAIN_TAG") =3D=3D "GCC5"= :=0D - self.gen_code_coverage_gcc(thebuilder)=0D + ret =3D self.gen_code_coverage_gcc(thebuilder)=0D + if ret !=3D 0:=0D + failure_count +=3D 1=0D elif thebuilder.env.GetValue("TOOL_CHAIN_TAG").startswith = ("VS"):=0D - self.gen_code_coverage_msvc(thebuilder)=0D + ret =3D self.gen_code_coverage_msvc(thebuilder)=0D + if ret !=3D 0:=0D + failure_count +=3D 1=0D else:=0D logging.info("Skipping code coverage. Currently, suppo= rt GCC and MSVC compiler.")=0D =0D --=20 2.39.2.windows.1