From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.13429.1682572169184893561 for ; Wed, 26 Apr 2023 22:09:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=aXJ+LUTP; spf=pass (domain: intel.com, ip: 134.134.136.24, 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=1682572169; x=1714108169; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zswzUvz58OzAPcFhHQzjm3W4k9f6eeGStBUoJsOKfnM=; b=aXJ+LUTPGXiefn2FxOyfAe+p+aHvd4cXwYcK9Hc+zLS6ZNH4BkR6mP32 T/0nM7XVc1fqO9uIAZcqNsmvhyyDWglgfzoZy6yFuXY6tgxi678LZ6K/t HN+zxo9bpPIOd8cod/HC6FNS/R/AyK/FCSZtcNZe0kdf5pyjhURwD77oN ewdjAPXnGErRiPJmvIZWQrGKsDcH6LZPNsH2UYGDjxTTvtB6KTZBFme5E 0SoNskdDmnoqdrcHbaylKfi1zoF2nB7xiFWlHClHzDd/4t+5yEl2tWhGI 1kz9AKv0IbSZAANneEtIuFRr1TyKlXUO/ni2H9aWtfpm2F8qh4nT7Zaxd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="349277988" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="349277988" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 22:09:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="818378196" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="818378196" Received: from gguo-desk.gar.corp.intel.com ([10.5.215.23]) by orsmga004.jf.intel.com with ESMTP; 26 Apr 2023 22:09:27 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: gua.guo@intel.com, Michael D Kinney , Sean Brogan , Michael Kubacki Subject: [PATCH v3 1/3] BaseTools/Plugin: Report error if code coverage failure Date: Thu, 27 Apr 2023 13:09:18 +0800 Message-Id: <20230427050920.1970-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 Reviewed-by: Michael D Kinney Reviewed-by: Michael Kubacki --- .../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