From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.9359.1682555668549840880 for ; Wed, 26 Apr 2023 17:34:28 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=kMm/CaLU; spf=pass (domain: intel.com, ip: 192.55.52.115, 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=1682555668; x=1714091668; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WWgye2zl/P0q9/nVnxORbKgvwvcI6z35E/ysxjrMwBY=; b=kMm/CaLUiz8HiiLori3iwANKZB0AiOcQvRKeFl0w9+9e+ZMZg/deClNN mB5cBAAQuK0Hgo3EycZEh24giS7APFD3L+QmKUv4dgvmCz2V2kl5dxhFz nFcD+Vd5gtgN5tOiRXUtl57RNiiBt4K3wroniU0W1bKjbKwX/cXyUUGL2 F2qRj1HXx5IjlgzxGEKDKQIy6Us8vnFR5JVft1iZF0hwHyGKbkNDN6EHo arVH+OZSywUbO7qxlILZkrE7dNylVf3f4wp4vnHW4oc918Pt6kNWRbmh0 NO5InVUywVB+oumqr9t+Ir15BkuMlKJxGTtPuS/8nGeSqTWyTeo1dEHao Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="347297140" X-IronPort-AV: E=Sophos;i="5.99,229,1677571200"; d="scan'208";a="347297140" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 17:34:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="644458563" X-IronPort-AV: E=Sophos;i="5.99,229,1677571200"; d="scan'208";a="644458563" Received: from gguo-desk.gar.corp.intel.com ([10.5.215.23]) by orsmga003.jf.intel.com with ESMTP; 26 Apr 2023 17:34:26 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: gua.guo@intel.com, Michael D Kinney , Sean Brogan , Michael Kubacki Subject: [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure Date: Thu, 27 Apr 2023 08:34:15 +0800 Message-Id: <20230427003416.315-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 a384b55629..d993de9412 100644 --- a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py +++ b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py @@ -130,9 +130,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