public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v3 1/3] BaseTools/Plugin: Report error if code coverage failure
@ 2023-04-27  5:09 Guo, Gua
  2023-04-27  5:09 ` [PATCH v3 2/3] .azurepipelines: Choose container that have installed lcov Guo, Gua
  2023-04-27  5:09 ` [PATCH v3 3/3] .azurepipelines: Switch linux image default to Fedora-37 Guo, Gua
  0 siblings, 2 replies; 4+ messages in thread
From: Guo, Gua @ 2023-04-27  5:09 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>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.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] 4+ messages in thread

* [PATCH v3 2/3] .azurepipelines: Choose container that have installed lcov
  2023-04-27  5:09 [PATCH v3 1/3] BaseTools/Plugin: Report error if code coverage failure Guo, Gua
@ 2023-04-27  5:09 ` Guo, Gua
  2023-04-27  5:09 ` [PATCH v3 3/3] .azurepipelines: Switch linux image default to Fedora-37 Guo, Gua
  1 sibling, 0 replies; 4+ messages in thread
From: Guo, Gua @ 2023-04-27  5:09 UTC (permalink / raw)
  To: devel
  Cc: gua.guo, Michael D Kinney, Sean Brogan, Michael Kubacki,
	Oliver Steffen, Chris Fernald

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

Azure should install code coverage tool (lcov), it didn't
exist on Fedora and Ubuntu by default.

Update docker setting, pick below solution between 47addc9 and 3b3eb8f
3b3eb8f Fixes and improvements to dev containers (#69)
54e5bd1 Enable GTK on Fedora QEMU (#63)
f1c7a20 Fedora: install code coverage tools for GCC (#62)
2ce82af Ubuntu-22: Add initial Ubuntu-22 image (#61)
14d2aba Add Fedora 37 image with gcc12 (#60)
5b8a008 Add dotnet runtime to fedora build (#57)
f5c874a Fix platform build file name for EDK2 change (#58)
48540ad Ubuntu-20: Fix dev image entrypoint (#55)
98e849d Fedora-35: Add Powershell to build image (#52)

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Oliver Steffen <osteffen@redhat.com>
Cc: Chris Fernald <chfernal@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>
Reviewed-by: Chris Fernald <chfernal@microsoft.com>
---
 .azurepipelines/templates/defaults.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/defaults.yml b/.azurepipelines/templates/defaults.yml
index 74d6b41783..8412a43cad 100644
--- a/.azurepipelines/templates/defaults.yml
+++ b/.azurepipelines/templates/defaults.yml
@@ -9,4 +9,4 @@
 
 variables:
   default_python_version: ">=3.10.6"
-  default_linux_image: "ghcr.io/tianocore/containers/fedora-35-test:47addc9"
+  default_linux_image: "ghcr.io/tianocore/containers/fedora-35-test:3b3eb8f"
-- 
2.39.2.windows.1


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

* [PATCH v3 3/3] .azurepipelines: Switch linux image default to Fedora-37
  2023-04-27  5:09 [PATCH v3 1/3] BaseTools/Plugin: Report error if code coverage failure Guo, Gua
  2023-04-27  5:09 ` [PATCH v3 2/3] .azurepipelines: Choose container that have installed lcov Guo, Gua
@ 2023-04-27  5:09 ` Guo, Gua
  2023-05-03 11:52   ` Oliver Steffen
  1 sibling, 1 reply; 4+ messages in thread
From: Guo, Gua @ 2023-04-27  5:09 UTC (permalink / raw)
  To: devel
  Cc: gua.guo, Michael D Kinney, Sean Brogan, Michael Kubacki,
	Oliver Steffen, Chris Fernald

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

Switch default linux build image from Fedora-35 to Fedora-37

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Oliver Steffen <osteffen@redhat.com>
Cc: Chris Fernald <chfernal@microsoft.com>
Signed-off-by: Gua Guo <gua.guo@intel.com>
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
---
 .azurepipelines/templates/defaults.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/defaults.yml b/.azurepipelines/templates/defaults.yml
index 8412a43cad..6730a0e8e4 100644
--- a/.azurepipelines/templates/defaults.yml
+++ b/.azurepipelines/templates/defaults.yml
@@ -9,4 +9,4 @@
 
 variables:
   default_python_version: ">=3.10.6"
-  default_linux_image: "ghcr.io/tianocore/containers/fedora-35-test:3b3eb8f"
+  default_linux_image: "ghcr.io/tianocore/containers/fedora-37-test:3b3eb8f"
-- 
2.39.2.windows.1


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

* Re: [PATCH v3 3/3] .azurepipelines: Switch linux image default to Fedora-37
  2023-04-27  5:09 ` [PATCH v3 3/3] .azurepipelines: Switch linux image default to Fedora-37 Guo, Gua
@ 2023-05-03 11:52   ` Oliver Steffen
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Steffen @ 2023-05-03 11:52 UTC (permalink / raw)
  To: devel, gua.guo
  Cc: Michael D Kinney, Sean Brogan, Michael Kubacki, Chris Fernald

Note that this also switches GCC to version 12 for all architectures.

Reviewed-By: Oliver Steffen <osteffen@redhat.com>

Quoting gua.guo@intel.com (2023-04-27 07:09:20)
> From: Gua Guo <gua.guo@intel.com>
>
> Switch default linux build image from Fedora-35 to Fedora-37
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Michael Kubacki <mikuback@linux.microsoft.com>
> Cc: Oliver Steffen <osteffen@redhat.com>
> Cc: Chris Fernald <chfernal@microsoft.com>
> Signed-off-by: Gua Guo <gua.guo@intel.com>
> Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
> ---
>  .azurepipelines/templates/defaults.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.azurepipelines/templates/defaults.yml b/.azurepipelines/templates/defaults.yml
> index 8412a43cad..6730a0e8e4 100644
> --- a/.azurepipelines/templates/defaults.yml
> +++ b/.azurepipelines/templates/defaults.yml
> @@ -9,4 +9,4 @@
>
>  variables:
>    default_python_version: ">=3.10.6"
> -  default_linux_image: "ghcr.io/tianocore/containers/fedora-35-test:3b3eb8f"
> +  default_linux_image: "ghcr.io/tianocore/containers/fedora-37-test:3b3eb8f"
> --
> 2.39.2.windows.1
>


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27  5:09 [PATCH v3 1/3] BaseTools/Plugin: Report error if code coverage failure Guo, Gua
2023-04-27  5:09 ` [PATCH v3 2/3] .azurepipelines: Choose container that have installed lcov Guo, Gua
2023-04-27  5:09 ` [PATCH v3 3/3] .azurepipelines: Switch linux image default to Fedora-37 Guo, Gua
2023-05-03 11:52   ` Oliver Steffen

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