public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure
@ 2023-04-27  0:34 Guo, Gua
  2023-04-27  0:34 ` [PATCH v2 2/2] .azurepipelines: Choose container that have installed lcov Guo, Gua
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Guo, Gua @ 2023-04-27  0:34 UTC (permalink / raw)
  To: devel; +Cc: gua.guo, Michael D Kinney, Sean Brogan, Michael Kubacki

From: Gua Guo <gua.guo@intel.com>

If code coverage exist failure, CI/CD need to catch it

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Signed-off-by: Gua Guo <gua.guo@intel.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 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.")
 
-- 
2.39.2.windows.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure
@ 2023-04-23  1:22 Guo, Gua
  2023-04-23  3:13 ` Michael D Kinney
  0 siblings, 1 reply; 11+ messages in thread
From: Guo, Gua @ 2023-04-23  1:22 UTC (permalink / raw)
  To: devel; +Cc: Gua Guo, Michael D Kinney, Sean Brogan, Michael Kubacki

From: Gua Guo <gua.guo@intel.com>

If code coverage exist failure, CI/CD need to catch it

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Signed-off-by: Gua Guo <gua.guo@intel.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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-03 11:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27  0:34 [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure Guo, Gua
2023-04-27  0:34 ` [PATCH v2 2/2] .azurepipelines: Choose container that have installed lcov Guo, Gua
2023-04-27  0:52   ` Michael D Kinney
2023-04-27  1:23     ` Guo, Gua
2023-04-27  1:28   ` Michael Kubacki
2023-04-27  1:38   ` [edk2-devel] " Chris Fernald
2023-05-03 11:54   ` Oliver Steffen
2023-04-27  0:50 ` [PATCH v2 1/2] BaseTools/Plugin: Report error if code coverage failure Michael D Kinney
2023-04-27  1:20 ` [edk2-devel] " Michael Kubacki
  -- strict thread matches above, loose matches on Subject: below --
2023-04-23  1:22 Guo, Gua
2023-04-23  3:13 ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox