Skip to content

Commit 7f5c24a

Browse files
Javagedesmergify[bot]
authored andcommitted
.pytool: Integration of edk2-pytools
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 <[email protected]> Cc: Michael Kubacki <[email protected]> Cc: Michael D Kinney <[email protected]> Cc: Liming Gao <[email protected]> Signed-off-by: Joey Vagedes <[email protected]> Message-Id: <[email protected]> Reviewed-by: Rebecca Cran <[email protected]> Reviewed-by: Michael Kubacki <[email protected]>
1 parent 7ff6ab2 commit 7f5c24a

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import os
1111
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
1212
from edk2toollib.uefi.edk2.parsers.dsc_parser import DscParser
13-
from edk2toollib.uefi.edk2.parsers.inf_parser import InfParser
13+
from edk2toollib.uefi.edk2.parsers.inf_parser import InfParser, AllPhases
1414
from edk2toolext.environment.var_dict import VarDict
1515

1616

@@ -116,8 +116,9 @@ def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environment, PLM,
116116
# should compile test a library that is declared type HOST_APPLICATION
117117
pass
118118

119-
elif len(infp.SupportedPhases) > 0 and \
120-
"HOST_APPLICATION" in infp.SupportedPhases:
119+
elif (len(infp.SupportedPhases) > 0 and
120+
"HOST_APPLICATION" in infp.SupportedPhases and
121+
infp.SupportedPhases != AllPhases):
121122
# should compile test a library that supports HOST_APPLICATION but
122123
# require it to be an explicit opt-in
123124
pass

.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _get_git_ignored_paths(self) -> List[str]:
299299
If git is not found, an empty list will be returned.
300300
"""
301301
if not shutil.which("git"):
302-
logging.warn(
302+
logging.warning(
303303
"Git is not found on this system. Git submodule paths will not be considered.")
304304
return []
305305

@@ -325,7 +325,7 @@ def _get_git_submodule_paths(self) -> List[str]:
325325
If git is not found, an empty list will be returned.
326326
"""
327327
if not shutil.which("git"):
328-
logging.warn(
328+
logging.warning(
329329
"Git is not found on this system. Git submodule paths will not be considered.")
330330
return []
331331

@@ -372,9 +372,9 @@ def _get_template_file_contents(self) -> None:
372372
file_template_path = pathlib.Path(os.path.join(self._plugin_path, file_template_name))
373373
self._file_template_contents = file_template_path.read_text()
374374
except KeyError:
375-
logging.warn("A file header template is not specified in the config file.")
375+
logging.warning("A file header template is not specified in the config file.")
376376
except FileNotFoundError:
377-
logging.warn("The specified file header template file was not found.")
377+
logging.warning("The specified file header template file was not found.")
378378
try:
379379
func_template_name = parser["dummy_section"]["cmt_insert_func_header"]
380380

@@ -384,9 +384,9 @@ def _get_template_file_contents(self) -> None:
384384
func_template_path = pathlib.Path(os.path.join(self._plugin_path, func_template_name))
385385
self._func_template_contents = func_template_path.read_text()
386386
except KeyError:
387-
logging.warn("A function header template is not specified in the config file.")
387+
logging.warning("A function header template is not specified in the config file.")
388388
except FileNotFoundError:
389-
logging.warn("The specified function header template file was not found.")
389+
logging.warning("The specified function header template file was not found.")
390390

391391
def _initialize_app_info(self) -> None:
392392
"""

pip-requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# https://www.python.org/dev/peps/pep-0440/#version-specifiers
1313
##
1414

15-
edk2-pytool-library==0.15.3
16-
edk2-pytool-extensions~=0.23.10
15+
edk2-pytool-library==0.19.3
16+
edk2-pytool-extensions~=0.25.1
1717
edk2-basetools==0.1.48
1818
antlr4-python3-runtime==4.7.1
1919
lcov-cobertura==2.0.2

0 commit comments

Comments
 (0)