]> xenbits.xensource.com Git - ovmf.git/commitdiff
BaseTools/Plugin: Report error if code coverage failure
authorGua Guo <gua.guo@intel.com>
Sun, 23 Apr 2023 01:14:22 +0000 (09:14 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 27 Apr 2023 21:55:58 +0000 (21:55 +0000)
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>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py

index a384b556294c539b9722e4069257080b226d555f..d993de941272954a891cac417431892d8721b603 100644 (file)
@@ -130,9 +130,13 @@ class HostBasedUnitTestRunner(IUefiBuildPlugin):
 \r
             if thebuilder.env.GetValue("CODE_COVERAGE") != "FALSE":\r
                 if thebuilder.env.GetValue("TOOL_CHAIN_TAG") == "GCC5":\r
-                    self.gen_code_coverage_gcc(thebuilder)\r
+                    ret = self.gen_code_coverage_gcc(thebuilder)\r
+                    if ret != 0:\r
+                        failure_count += 1\r
                 elif thebuilder.env.GetValue("TOOL_CHAIN_TAG").startswith ("VS"):\r
-                    self.gen_code_coverage_msvc(thebuilder)\r
+                    ret = self.gen_code_coverage_msvc(thebuilder)\r
+                    if ret != 0:\r
+                        failure_count += 1\r
                 else:\r
                     logging.info("Skipping code coverage. Currently, support GCC and MSVC compiler.")\r
 \r