public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Joey Vagedes via groups.io" <joeyvagedes=microsoft.com@groups.io>
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@microsoft.com>,
	Michael Kubacki <mikuback@linux.microsoft.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>
Subject: [edk2-devel] [PATCH v1 1/2] .pytool: Integration of edk2-pytools
Date: Fri, 27 Oct 2023 08:15:50 -0700	[thread overview]
Message-ID: <20231027151551.1043941-2-joeyvagedes@microsoft.com> (raw)
In-Reply-To: <20231027151551.1043941-1-joeyvagedes@microsoft.com>

Performs Integration instructions necessary to upgrade edk2-pytool-library
to 0.19.3 and edk2-pytool-extensions to 0.25.1. This includes resolving
deprecation warnings in the UncrustifyCheck plugin, and Updating the
HostUnitTestDscCompleteCheck plguin to account for a change such that inf's
that do not filter the LIBRARY_CLASS define to certain types, are assumed
to also support HOST_APPLICATION.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com>
---
 .pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py |  7 ++++---
 .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py                           | 12 ++++++------
 pip-requirements.txt                                                        |  4 ++--
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/.pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py b/.pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py
index 8a8883edf4a9..164c8d4b7fd3 100644
--- a/.pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py
+++ b/.pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py
@@ -10,7 +10,7 @@ import logging
 import os
 from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
 from edk2toollib.uefi.edk2.parsers.dsc_parser import DscParser
-from edk2toollib.uefi.edk2.parsers.inf_parser import InfParser
+from edk2toollib.uefi.edk2.parsers.inf_parser import InfParser, AllPhases
 from edk2toolext.environment.var_dict import VarDict
 
 
@@ -116,8 +116,9 @@ class HostUnitTestDscCompleteCheck(ICiBuildPlugin):
                     # should compile test a library that is declared type HOST_APPLICATION
                     pass
 
-                elif len(infp.SupportedPhases) > 0 and \
-                        "HOST_APPLICATION" in infp.SupportedPhases:
+                elif (len(infp.SupportedPhases) > 0 and
+                      "HOST_APPLICATION" in infp.SupportedPhases and
+                      infp.SupportedPhases != AllPhases):
                     # should compile test a library that supports HOST_APPLICATION but
                     # require it to be an explicit opt-in
                     pass
diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
index 8dc9ffe6945a..92aa3c33774d 100644
--- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
+++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
@@ -299,7 +299,7 @@ class UncrustifyCheck(ICiBuildPlugin):
         If git is not found, an empty list will be returned.
         """
         if not shutil.which("git"):
-            logging.warn(
+            logging.warning(
                 "Git is not found on this system. Git submodule paths will not be considered.")
             return []
 
@@ -325,7 +325,7 @@ class UncrustifyCheck(ICiBuildPlugin):
         If git is not found, an empty list will be returned.
         """
         if not shutil.which("git"):
-            logging.warn(
+            logging.warning(
                 "Git is not found on this system. Git submodule paths will not be considered.")
             return []
 
@@ -372,9 +372,9 @@ class UncrustifyCheck(ICiBuildPlugin):
                 file_template_path = pathlib.Path(os.path.join(self._plugin_path, file_template_name))
                 self._file_template_contents = file_template_path.read_text()
         except KeyError:
-            logging.warn("A file header template is not specified in the config file.")
+            logging.warning("A file header template is not specified in the config file.")
         except FileNotFoundError:
-            logging.warn("The specified file header template file was not found.")
+            logging.warning("The specified file header template file was not found.")
         try:
             func_template_name = parser["dummy_section"]["cmt_insert_func_header"]
 
@@ -384,9 +384,9 @@ class UncrustifyCheck(ICiBuildPlugin):
                 func_template_path = pathlib.Path(os.path.join(self._plugin_path, func_template_name))
                 self._func_template_contents = func_template_path.read_text()
         except KeyError:
-            logging.warn("A function header template is not specified in the config file.")
+            logging.warning("A function header template is not specified in the config file.")
         except FileNotFoundError:
-            logging.warn("The specified function header template file was not found.")
+            logging.warning("The specified function header template file was not found.")
 
     def _initialize_app_info(self) -> None:
         """
diff --git a/pip-requirements.txt b/pip-requirements.txt
index a722dd3ac0b2..8177c60d1808 100644
--- a/pip-requirements.txt
+++ b/pip-requirements.txt
@@ -12,8 +12,8 @@
 # https://www.python.org/dev/peps/pep-0440/#version-specifiers
 ##
 
-edk2-pytool-library==0.15.3
-edk2-pytool-extensions~=0.23.10
+edk2-pytool-library==0.19.3
+edk2-pytool-extensions~=0.25.1
 edk2-basetools==0.1.48
 antlr4-python3-runtime==4.7.1
 lcov-cobertura==2.0.2
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110216): https://edk2.groups.io/g/devel/message/110216
Mute This Topic: https://groups.io/mt/102223494/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-10-27 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 15:15 [edk2-devel] [PATCH v1 0/2] Upgrade edk2-pytools to latest Joey Vagedes via groups.io
2023-10-27 15:15 ` Joey Vagedes via groups.io [this message]
2023-10-27 15:15 ` [edk2-devel] [PATCH v1 2/2] BaseTools: Plugin: Integration of edk2-pytools Joey Vagedes via groups.io
2023-10-27 15:45 ` [edk2-devel] [PATCH v1 0/2] Upgrade edk2-pytools to latest Rebecca Cran via groups.io
2023-10-27 17:32 ` Michael Kubacki
2023-10-27 17:41   ` Joey Vagedes via groups.io
2023-10-28 14:20     ` Laszlo Ersek
2023-10-28 15:24       ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231027151551.1043941-2-joeyvagedes@microsoft.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox