Joey Vagedes
d97f3a1d80
.pytool/Plugin: UncrustifyCheck: use stat instead of os.stat
...
The UncrustifyCheck plugin passes os.stat.S_IWRITE to os.chmod, when
attempting to change file permissions. os.stat.S_IWRITE does not exist
as os.stat is a function. The correct value is stat.S_IWRITE.
Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2024-01-23 16:04:20 +00:00
Abdul Lateef Attar
58355ec192
.pytool/Readme.md: Update matrix for DynamicTablesPkg
...
Update the "Basic Status" matrix for DynamicTablesPkg by
adding a check mark for Windows VS2019 IA32/X64 support.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Joey Vagedes <joey.vagedes@gmail.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Pierre Gondois <pierre.gondois@arm.com >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com >
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com >
Reviewed-by: Joey Vagedes <joey.vagedes@gmail.com >
2024-01-11 22:45:01 +00:00
Michael Kubacki
ec9cb4452e
.pytool/UncrustifyCheck: Update to 73.0.8
...
Updates to the latest release.
- Includes a fix for preventing endless indentation in struct
assignment.
- Include Windows Arm, Linux Arm, and Mac OS builds.
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: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
2023-11-27 20:14:59 +00:00
Michael Kubacki
a3e8efcc8e
.pytool/CISettings: Enable CodeQL audit mode
...
Since a large number of CodeQL queries are being enabled to identify
issues that the community can collectively resolve, audit mode needs to
be enabled to prevent the build from failing.
In the future, this global audit mode can be disabled and individual
packages can enable/disable audit mode in their package CI YAML file
using the instructions in the CodeQL plugin readme.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-11-07 03:19:26 +00:00
Michael Kubacki
29763016e0
.pytool/CISettings.py: Integrate CodeQL
...
Adds the `--codeql` parameter to `stuart_update` and
`stuart_ci_build`.
- `stuart_update --codeql` - Downloads the CodeQL CLI locally. The
command will pull the appropriate binary for the host OS.
- `stuart_ci_build --codeql` - Runs CodeQL during the build resulting
in a CodeQL database and SARIF result file in the `Build`
directory.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-11-07 03:19:26 +00:00
Joey Vagedes
7f5c24ad35
.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 <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 >
Message-Id: <20231027151551.1043941-2-joeyvagedes@microsoft.com >
Reviewed-by: Rebecca Cran <rebecca@os.amperecomputing.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
2023-10-28 14:59:29 +00:00
Vivian Nowka-Keane
ca32f75fc6
.pytool: Undo uncrustify check change
...
Set global audit only to False now that new rules have been applied to
all necessary packages.
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: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-10-27 00:50:49 +00:00
Vivian Nowka-Keane
41c622523d
.pytool: Add cpp support to uncrustify plugin
...
Modified the uncrustify config to apply cpp specific formatting rules.
Modified uncrustify check to include *.cpp files.
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: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-10-27 00:50:49 +00:00
Vivian Nowka-Keane
d0cac9f63f
.pytool: Set uncrustify check to audit only (temporary)
...
Temporarily set uncrustify to audit only mode so the following commits can adjust the code for new formatting settings before those settings are applied.
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: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-10-27 00:50:49 +00:00
Wenxing Hou
26754b3707
CryptoPkg: Add Mbedtls submodule in CI
...
Change CI for new Mbedtls submodule.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Yi Li <yi1.li@intel.com >
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com >
Cc: Guomin Jiang <guomin.jiang@intel.com >
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com >
Reviewed-by: Yi Li <yi1.li@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-10-12 05:31:19 +00:00
Oliver Smith-Denny
cdd20638bc
CharEncodingCheckPlugin: Remove Noisy Print
...
Currently, CharEncodingCheckPlugin prints a message for every
file that passes the test, which for some platforms can cause
most of the CI build log to be filled with this print. It does
not add any value, so this patch removes the noisy print and
only prints if the encoding check fails.
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 >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com >
2023-06-06 17:08:05 +00:00
Gua Guo
782948c1a7
MdePkg: Add mipisyst submodule
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4144
This Library provides functions consuming MIPI SYS-T submodule.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Andrew Fish <afish@apple.com >
Cc: Leif Lindholm <quic_llindhol@quicinc.com >
Cc: Guo Gua <gua.guo@intel.com >
Cc: Chan Laura <laura.chan@intel.com >
Cc: Prakashan Krishnadas Veliyathuparambil <krishnadas.veliyathuparambil.prakashan@intel.com >
Cc: K N Karthik <karthik.k.n@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Kubacki <mikuback@linux.microsoft.com >
Signed-off-by: Guo Gua <gua.guo@intel.com >
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com >
Acked-by: Liming Gao <gaoliming@byosoft.com.cn >
2023-05-11 07:26:38 +00:00
Benny Lin
ff7cb2d7c9
.pytool: Support FDT library.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt )
Add RequiredSubmodule object for CI setting.
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: Benny Lin <benny.lin@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-05-05 03:45:21 +00:00
Chris Johnson
caa389625f
.pytool/CISettings.py: Add subhook submodule
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389
Add submodule for https://github.com/Zeex/subhook
This submodule is required to hook internal functions
when using gmock.
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: Chris Johnson <chris.n.johnson@intel.com >
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2023-04-10 05:59:02 +00:00
Marvin Ha?user
b59e6fdae2
.pytool/Plugin/EccCheck: Add PACKAGES_PATH support
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4326
EccBuild currently assumes all packages reside in WORKSPACE. However,
this is obviously not the case for many setups. Most notably, Ext4Pkg
is located in edk2-platforms/Features and thus cannot be in WORKSPACE
in any reasonable setup.
Use Edk2Path to locate the package in WORKSPACE and PACKAGES_PATH.
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 >
Cc: Pedro Falcato <pedro.falcato@gmail.com >
Signed-off-by: Marvin H?user <mhaeuser@posteo.de >
Acked-by: Pedro Falcato <pedro.falcato@gmail.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
2023-02-08 20:21:30 +00:00
Oliver Steffen
5d25638e1b
.pytool: CISettings.py: don't add scopes for GCC
...
All ext_dep.yml files for gcc have been removed and gcc is expected to
be installed on the system (GCC5_*_PREFIX may indicate the location).
No need to adjust the toolchain scopes for Linux builds anymore.
Signed-off-by: Oliver Steffen <osteffen@redhat.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Chris Fernald <chfernal@microsoft.com >
2023-01-17 19:06:32 +00:00
Michael Kubacki
0e3e62fc2b
.pytool/Readme.md: Add reference to new build instructions
...
Adds a reference to the new build instructions on the TianoCore wiki
that currently describe building with containers and Stuart.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com >
2022-12-16 22:17:18 +00:00
Michael D Kinney
80f097711b
.pytool: Add googletest submodule to CISettings.py
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4134
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Kubacki <mikuback@linux.microsoft.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com >
2022-11-11 05:46:51 +00:00
Chao Li
b1b5177a0c
.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053
Add LoongArch64 architecture on LoongArch64 EDK2 CI testing.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Chao Li <lichao@loongson.cn >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2022-10-14 02:16:33 +00:00
Chao Li
082b563fc4
.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053
Add Loongson and LOONGARCH to "words" section in cspell.base.yaml file
to avoid spelling check error.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Chao Li <lichao@loongson.cn >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2022-10-14 02:16:33 +00:00
Michael Kubacki
cf01fdd5d7
SourceLevelDebugPkg: Add package CI YAML file
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4091
Adds the package as a supported package to .pytool/CISettings.py
and adds a CI YAML for the package so it can be run in CI.
Cc: Hao A Wu <hao.a.wu@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Hao A Wu <hao.a.wu@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2022-10-06 02:09:28 +00:00
Michael Kubacki
b3d379d188
SignedCapsulePkg: Add package CI YAML file
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4050
Adds the package as a supported package to .pytool/CISettings.py
and adds a CI YAML for the package so it can be run in CI.
Cc: Jian J Wang <jian.j.wang@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2022-10-04 17:49:56 +00:00
Michael Kubacki
9ecab62d40
IntelFsp2WrapperPkg: Add CI YAML file
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4048
Adds IntelFsp2WrapperPkg to the list of supported build packages
for edk2 CI and defines an initial set of CI configuration options.
Adds a special case for the Library Class check CI plugin to ignore
FspWrapperPlatformMultiPhaseLib with an explanatory comment.
Cc: Chasel Chiu <chasel.chiu@intel.com >
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney>
2022-10-04 16:53:59 +00:00
Michael Kubacki
28b16c01cf
IntelFsp2Pkg: Add CI YAML file
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4048
Adds IntelFsp2Pkg to the list of supported build packages for edk2
CI and defines an initial set of CI configuration options.
Cc: Chasel Chiu <chasel.chiu@intel.com >
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney>
2022-10-04 16:53:59 +00:00
Michael Kubacki
43c1111530
EmbeddedPkg: Add CI YAML file
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4046
Adds EmbeddedPkg to the list of supported build packages for edk2
CI and fixes Library Class Check errors reported.
These changes allow EmbeddedPkg to pass NO-TARGET CI testing.
Cc: Leif Lindholm <quic_llindhol@quicinc.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Abner Chang <abner.chang@amd.com >
Cc: Daniel Schaefer <git@danielschaefer.me >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
2022-10-03 18:22:03 +00:00
Kun Qin
4f89e4b3e8
.pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3942
`IgnoreFiles` tag is specified in the CI YAML files in each individual
packages. The current logic for UncrustifyCheck script bases specified
file paths from workspace, which requires the package name to be included
in each entry.
This change updates the ignore checking logic to be based on current
package path in order to reduce redundancy. It also keeps the consistency
of `IgnoreFiles` field other pytools such as SpellCheck and EccCheck.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Michael Kubacki <mikuback@linux.microsoft.com >
Signed-off-by: Kun Qin <kuqin12@gmail.com >
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com >
2022-06-07 01:53:24 +00:00
Michael Kubacki
2189c71026
.pytool/plugin/SpellCheck: Add more common words
...
Appends the word list to reduce the number of errors encountered
by individual packages.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2022-05-19 03:02:14 +00:00
Michael Kubacki
7b126978e1
.pytool/plugin/SpellCheck: Allow compound words
...
Sets "allowCompoundWords" to "true" to reduce the number of compound
word issues encountered in the future.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2022-05-19 03:02:14 +00:00
Chao Li
0e31124877
.pytool: Fix python command error in self introduction doc
...
Fix misspelling of word "Prerequisites".
In the step 5 of the Prerequisites section, the python command was missing
the "-r" option, what the command really meant was to install from the given
requirements file, so fix that.
Cc: sean.brogan@microsoft.com
Cc: Bret.Barkelew@microsoft.com
Cc: michael.d.kinney@intel.com
Cc: gaoliming@byosoft.com.cn
Signed-off-by: Chao Li <lichao@loongson.cn >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2022-05-09 14:37:42 +00:00
Michael Kubacki
2d9d605714
.pytool/Plugin/UncrustifyCheck: Add Azure DevOps UI debug instructions
...
Adds a link to the log output that contains instructions on how find
detailed file formatting errors in the Azure DevOps UI.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
2022-04-22 17:52:26 +00:00
Michael Kubacki
f3c11224b5
PrmPkg: Changes for edk2 repo transition
...
Updates the Readme.md files to remove information that was specific
to the package in edk2-staging and adds key definitions being added
for PRM support in the ACPI Specification.
Adds PrmPkg/PrmPkg.ci.yaml to support CI.
Adds PrmPkg to .pytool/CISettings.py.
Adds PrmPkg maintainers to Maintainers.txt.
Cc: Andrew Fish <afish@apple.com >
Cc: Kang Gao <kang.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Michael Kubacki <michael.kubacki@microsoft.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Benjamin You <benjamin.you@intel.com >
Cc: Liu Yun <yun.y.liu@intel.com >
Cc: Ankit Sinha <ankit.sinha@intel.com >
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Acked-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Liming Gao <gaoliming@byosoft.com.cn >
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com >
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com >
2022-04-05 00:42:38 +00:00
Michael Kubacki
dbfbaedb21
.pytool/Plugin/UncrustifyCheck: Add ignore file support
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3880
Currently UncrustifyCheck.py provides the following exclusion
options:
1. Override the type of files UncrustifyCheck operates against by
default (.c and .h files). Using the "IgnoreStandardPaths"
configuration option.
2. By default, UncrustifyCheck skips files in git submodules and
ignored by git (the "SkipGitExclusions" configuration option can
override this behavior).
The goal of UncrustifyCheck is to provide consistent formatting
across the codebase. In some rare circumstances, maintainers might
need to exclude a specific file (or file pattern) within their
package. For example, a small set of auto-generated files from
another repository.
This change adds a new configuration option that can be specified
in a package CI YAML file to describe a list of files within the
package that should be ignored by UncrustifyCheck.
The configuration option is called "IgnoreFiles" and it uses similar
syntax to git ignore to ignore a list of files.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2022-04-04 15:18:31 +00:00
Michael Kubacki
f16b05a13b
.pytool/Plugin/UncrustifyCheck: Update func to return absolute paths
...
Currently, UncrustifyCheck._get_git_ignored_paths() is documented to
return a list of absolute file paths but it currently returns a list
of relative file paths.
This change updates the function to return a list of absolute file
paths. The result is later compared to the list of absolute file
paths for files to run against Uncrustify.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2022-04-04 15:18:31 +00:00
Ken Lautner
2aac8bb7ef
.pytool: Update to newest pytools
...
Update to the newest pytools and resolves the API change for
GetAbsolutePathOnThisSytemFromEdk2RelativePath
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Kenneth Lautner <kenlautner3@gmail.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
2022-03-09 18:58:33 +00:00
Michael Kubacki
56530dec11
.pytool/Plugin/UncrustifyCheck: Output file diffs by default
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3808
Changes the default for the "OutputFileDiffs" configuration option
to "True" so the formatting suggestions detected by Uncrustify
will be output in the test case log. The diff is printed in unified
diff format.
This was disabled by default during the initial enabling of
Uncrustify to reduce overall execution time of the plugin against
the codebase due to the large number of changes detected.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Rebecca Cran <quic_rcran@quicinc.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
2022-03-08 18:41:39 +00:00
Michael Kubacki
dc453b5164
.pytool/Plugin/UncrustifyCheck: Add Uncrustify CI plugin
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3748
Adds a new CI plugin for Uncrustify. This is used to check
coding standard compliance of source code to the EDK II C Coding
Standards Specification.
An external dependency is added in the plugin directory to retrieve
the Uncrustify executable. Currently, the executable is from an edk2
fork of the application host in this repository:
https://dev.azure.com/projectmu/Uncrustify/
Note that the Uncrustify application outputs the commit ID that the
application was built from when given the --version parameter.
This ID can be mapped to the version specified in the Uncrustify CI
plugin external dependency file (uncrustify_ext_dep.yaml) such as
73.0.3 by visiting the Uncrustify edk2 fork release pipeline page
which associates the NuGet package version with the commit ID it was
built from:
https://dev.azure.com/projectmu/Uncrustify/_build
The default Uncrustify configuration files are added in the plugin
directory. Additional details are in the Readme.md file added in
the Uncrustify plugin directory.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Tested-by: Michael D Kinney <michael.d.kinney@intel.com >
2021-12-07 18:51:02 +00:00
Michael D Kinney
99f84ff473
.pytools/Plugin/LicenseCheck: Use temp directory for git diff output
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3746
Use --output option in git diff command to remove code diffs
from build log on stdout when LicenseCheck plugin is run.
Instead, create a temp directory for the diff output file and
remove the temp directory after the diff output is processed.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Michael Kubacki <michael.kubacki@microsoft.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
2021-11-29 07:12:18 +00:00
Michael D Kinney
3019f1bbab
.pytool/Plugin/EccCheck: Add performance optimizations
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2986
Improve the performance of EccCheck by using a temp file
instead of stdout to capture the results of the git diff
commands. If a large patch set is passed into EccCheck,
using stdout could be slow and also added the large diff
content to the build log that is redundant information.
A second performance improvement is to filter the
modified directories to remove duplicate directories.
Complex libraries and modules that have subdirectories
with sources would be scanned twice if there were source
changes in both the main directory and subdirectories.
Filter out the subdirectories from the modified directory
list when this case is detected.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Michael Kubacki <michael.kubacki@microsoft.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-11-29 06:38:51 +00:00
Michael D Kinney
854462bd34
.pytool/Plugin/EccCheck: Remove temp directory on exception
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2986
Add try/except to RunBuildPlugin() to remove temporary
directory if a KeyboardInterrupt exception or an unexpected
exception is detected.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Michael Kubacki <michael.kubacki@microsoft.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-11-29 06:38:51 +00:00
Michael D Kinney
69877614fd
.pytool/Plugin/EccCheck: Remove RevertCode()
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2986
The RevertCode() method uses git reset which can remove
local changes. Instead of modifying the local files, a
copy of the package passed into the EccCheck tool is
copied to a temp directory in Build/ecctemp. This same
temp directory is also used for exception.xml. The working
directory used by ECC is also set to this same temp
directory. The combination of these changes eliminates
operations that that modified the git state.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Michael Kubacki <michael.kubacki@microsoft.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Acked-by: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-11-29 06:38:51 +00:00
duntan
e3ee8c8dbd
.azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py
...
Add UefiPayloadPkg in gate-build-job.yml to enable Core ci for UefiPayloadPkg.
Add UefiPayloadPkg to supported Packages in CISettings.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: DunTan <dun.tan@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-09-02 01:46:30 +00:00
Pierre Gondois
fb5b6220a9
.pytool/EccCheck: Set PACKAGES_PATH env var in Ecc
...
When running Ecc on other repositories (e.g.: edk2-platforms with
edk2 as a submodule), edk2 modules are referenced.
E.g.: MdePkg/..
The PACKAGES_PATH env var can be used to reference other directories
containing packages. Set it so that Ecc can find these packages.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-07-12 14:53:55 +00:00
Pierre Gondois
50672d2692
.pytool/EccCheck: Check ecc_csv exists
...
'workspace_path' being an absolute path leads to 'ecc_csv' being
an absolute path. Then it won't be found among 'file' as they
are relative paths.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-07-12 14:53:55 +00:00
Pierre Gondois
a050c599df
.pytool/EccCheck: Rename edk2_path as workspace_path
...
The edk2 path and the workspace path are identical when running
Ecc on edk2. When running Ecc on another repository
(e.g.: edk2-platforms with edk2 as a submodule of edk2-platforms),
these directories are different. Indeed, in the latter configuration,
Ecc must run git commands on the tested repository, i.e. the workspace
directory, edk2-platforms.
Thus, rename edk2_path as workspace_path.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-07-12 14:53:55 +00:00
Pierre Gondois
22fe311bd2
.pytool/EccCheck: Locate BaseTools dir with EDK_TOOLS_PATH
...
The BaseTools directory is currently being located as a
sub-directory of the WORKSPACE env var. This might not be
true in other environments. Cf EDKII Build Specification,
s4.1.3 "Build Process Restrictions":
There is no restriction on the location of the EDK_TOOLS_PATH,
it may be located within a directory identified as the
WORKSPACE directory, or in any other location that is
accessible on the development workstation.
Locate the BaseTools directory using EDK_TOOLS_PATH instead.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-07-12 14:53:55 +00:00
Sean Brogan
f47c4676dd
Pytool: SpellCheck: Defer path expansion in cspell parameters
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3454
On Linux the shell expands the wildcard paths and causes multiple files
to be missed. This change adds additional quotes to defer expansion in
order to bring parity in cspell result.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com >
Signed-off-by: Kun Qin <kuqin12@gmail.com >
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-07-09 08:29:54 +00:00
Sean Brogan
288bd74a22
Pytool: SpellCheck: Fix incorrect file mask across package matrices
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3443
Existing implementation could modify class global data that causes
potential incorrect file mask to be used for execution of plugin.
This change switches class variable to be tuple so that it cannot be
accidently modified. Local usage of STANDARD_PLUGIN_DEFINED_PATHS is also
changed to copy to new list before modification.
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-06-15 07:12:13 +00:00
Pierre Gondois
ec9683ec0f
.pytool: Document LicenseCheck and EccCheck
...
Add an entry in the documentation for the LicenseCheck and
EccCheck plugins.
Cc: Bret Barkelew <bret.barkelew@microsoft.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Acked-by: Bret Barkelew <bret.barkelew@microsoft.com >
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com >
2021-04-28 12:03:51 +00:00
Pierre Gondois
a4cf19597f
.pytool: Enable CI for ArmPlatformPkg
...
Enable the CI for the ArmPlatformPkg.
Cc: Bret Barkelew <bret.barkelew@microsoft.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com >
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com >
2021-04-28 12:03:51 +00:00
Pierre Gondois
2942cb5815
.pytool: Enable CI for ArmPkg
...
Enable the CI for the ArmPkg.
Cc: Bret Barkelew <bret.barkelew@microsoft.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Sami Mujawar <sami.mujawar@arm.com >
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com >
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com >
2021-04-28 12:03:51 +00:00