summaryrefslogtreecommitdiffstats
path: root/.pytool
Commit message (Collapse)AuthorAgeFilesLines
* .pytool/EccCheck: Open files in utf-8Michael Kubacki2024-12-191-4/+4
| | | | | | | | | | | | The EccCheck plugin currently fails if a file contains characters outside the platform-dependent encoding returned from locale.getencoding(). This change updates the encoding to utf-8 so the plugin is more robust while continuing to support backward compatibility with the ASCII range. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* .pytool/LicenseCheck: Open files in utf-8Michael Kubacki2024-12-191-1/+1
| | | | | | | | | | | | The LicenseCheck plugin currently fails if a file contains characters outside the platform-dependent encoding returned from locale.getencoding(). This change updates the encoding to utf-8 so the plugin is more robust while continuing to support backward compatibility with the ASCII range. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* Update CI to VS2022Oliver Smith-Denny2024-12-101-2/+2
| | | | | | | | | This PR updates the CI pipelines to use VS2022 instead of VS2019 as that is the latest supported VS toolchain on edk2. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
* Drop git submodule for Berkeley softfloat libraryArd Biesheuvel2024-11-261-2/+0
| | | | | | This code is no longer in use so it can be dropped. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* .pytool/UncrustifyCheck: Add a in-place optionBret Barkelew2024-10-252-1/+27
| | | | | | | | | | | | | | To simplify automatic formatting of new code, this feature lets a local developer specify the `UNCRUSTIFY_IN_PLACE=TRUE` parameter on the command line to automatically format files. This is particularly useful when a large amount of new code needs to be formatted in batch. See the readme for more details. Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* .pytool/UncrustifyCheck: Show errors in outputMichael Kubacki2024-09-281-10/+13
| | | | | | | | | | | | | | | | | | | | | Shows code formatting errors directly in build output. Previously only the filenames were in build output and the user had to look at the test result file either locally or in CI to find details. It is still recommended that users configure their local environment to run Uncrustify so it can automatically fix problems as opposed to manually correcting code based on the output shown in the terminal. In any case, it is easier to see what is expected now. Uncrustify reference material: https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting https://github.com/tianocore/edk2/tree/master/.pytool/Plugin/UncrustifyCheck#readme Some logging levels are also updated to refocus log output by current message importance and relevance. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* .pytool/EccCheck: Trim leading path to modified directoryAbdul Lateef Attar2024-09-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code changes in the patch is for trimming the leading path to the modified directory in the .pytool/EccCheck script. This is necessary when running Ecc on other repositories, such as edk2-platforms, where the platform package is located in a subfolder, like Platform/AMD/AmdPlatformPkg. The EccCheck script checks for modified directories and expects them to start with the package name. # # Skip directory names that do not start with the package being scanned. # if file_dir.split('/')[0] != pkg: continue However, if the package name is in a subfolder, the "git diff" command gives a relative path, like Platform/AMD, which causes the condition to be false. "M Platform/AMD/AmdPlatformPkg/Universal/LogoDxe/Logo.c" As a result, EccCheck does not happen on modified files. To fix this issue, the leading path needs to be trimmed so that it starts from the directory name. This change will not affect the existing check for the edk2 repository, where all package names are at the first level directory. 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> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
* BaseTools: Remove Pip BaseToolsOliver Smith-Denny2024-09-101-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | BaseTools was moved out to a separate repo and consumed as a pip module by edk2 CI. This process has not led to the desired goals of doing so, so this patch removes the pip based BaseTools from edk2 CI. The original goal of moving BaseTools to a pip module was primarily to speed up the development process, as the old edk2 mailing list was slow. However, with edk2 moving to PRs, it now actually slows the BaseTools development process to have to do a PR in another repo, publish the module, and then make a PR in edk2 to consume the new BaseTools. It also holds up using the features in a new BaseTools in other PRs. There were other goals of moving, such as allowing projects to use the BaseTools outside of edk2. This can still be accomplished outside of this PR, this PR simply stops edk2 CI from using the pip module. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* .pytool: Sort the list of words in cspell.base.yamlRebecca Cran2024-08-011-234/+234
| | | | | | | Sort the list of words to add to cspell's dictionary by running the list through `sort`. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
* .pytool: Add "MPIDR" to the list of known words in cspell.base.yamlRebecca Cran2024-08-011-1/+2
| | | | | | | | "MPIDR" is the Multiprocessor Affinity Register on Arm systems. Add it the list of known words so that cspell doesn't flag it as a misspelling. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
* .pytool/Plugin: Improve plugin log messagesMichael Kubacki2024-07-173-12/+11
| | | | | | | Improves the CI output with more actionable messages and downgrades some errors/warnings. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* DscCompleteCheck: Allow git ignore syntaxJoey Vagedes2024-07-042-16/+40
| | | | | | | | | | Allows ignore lines in the CI YAML file to use git ignore syntax. This is especially useful for ignore files recursively in directories like those that may exist in an external dependency folder. Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
* .pytool: CompilerPlugin: Pass through build varsJoey Vagedes2024-07-031-3/+4
| | | | | | | Pass build variables (those passed to build.py through -D) to the DSC parser to provide a more accurate parsing of the DSC file. Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
* .pytool/CISettings.py: add libspdm submodule.Wenxing Hou2024-04-301-0/+2
| | | | | | | | | | | Add DeviceSecurity submodule libspdm. 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> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Joey Vagedes <joey.vagedes@gmail.com>
* .pytool/Plugin: UncrustifyCheck: use stat instead of os.statJoey Vagedes2024-01-231-1/+2
| | | | | | | | | | | | 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>
* .pytool/Readme.md: Update matrix for DynamicTablesPkgAbdul Lateef Attar2024-01-111-1/+1
| | | | | | | | | | | | | | | 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>
* .pytool/UncrustifyCheck: Update to 73.0.8Michael Kubacki2023-11-271-1/+1
| | | | | | | | | | | | | | | | 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>
* .pytool/CISettings: Enable CodeQL audit modeMichael Kubacki2023-11-071-0/+6
| | | | | | | | | | | | | | | | | | 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>
* .pytool/CISettings.py: Integrate CodeQLMichael Kubacki2023-11-071-0/+30
| | | | | | | | | | | | | | | | | | | 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>
* .pytool: Integration of edk2-pytoolsJoey Vagedes2023-10-282-9/+10
| | | | | | | | | | | | | | | | | | 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>
* .pytool: Undo uncrustify check changeVivian Nowka-Keane2023-10-271-1/+1
| | | | | | | | | | | | 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>
* .pytool: Add cpp support to uncrustify pluginVivian Nowka-Keane2023-10-272-3/+3
| | | | | | | | | | | | | 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>
* .pytool: Set uncrustify check to audit only (temporary)Vivian Nowka-Keane2023-10-271-1/+1
| | | | | | | | | | | 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>
* CryptoPkg: Add Mbedtls submodule in CIWenxing Hou2023-10-121-0/+2
| | | | | | | | | | | | | | 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>
* CharEncodingCheckPlugin: Remove Noisy PrintOliver Smith-Denny2023-06-061-3/+1
| | | | | | | | | | | | | | | | 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>
* MdePkg: Add mipisyst submoduleGua Guo2023-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* .pytool: Support FDT library.Benny Lin2023-05-051-0/+2
| | | | | | | | | | | | | | | 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>
* .pytool/CISettings.py: Add subhook submoduleChris Johnson2023-04-101-0/+2
| | | | | | | | | | | | | | | | | | | 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>
* .pytool/Plugin/EccCheck: Add PACKAGES_PATH supportMarvin Ha?user2023-02-081-1/+8
| | | | | | | | | | | | | | | | | | | | 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>
* .pytool: CISettings.py: don't add scopes for GCCOliver Steffen2023-01-171-9/+0
| | | | | | | | | | | | 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>
* .pytool/Readme.md: Add reference to new build instructionsMichael Kubacki2022-12-161-35/+17
| | | | | | | | | | | | 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>
* .pytool: Add googletest submodule to CISettings.pyMichael D Kinney2022-11-111-0/+2
| | | | | | | | | | 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>
* .pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.Chao Li2022-10-141-1/+4
| | | | | | | | | | | | 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>
* .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" sectionChao Li2022-10-141-1/+3
| | | | | | | | | | | | | 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>
* SourceLevelDebugPkg: Add package CI YAML fileMichael Kubacki2022-10-061-0/+1
| | | | | | | | | | | | | 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>
* SignedCapsulePkg: Add package CI YAML fileMichael Kubacki2022-10-041-0/+1
| | | | | | | | | | | 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>
* IntelFsp2WrapperPkg: Add CI YAML fileMichael Kubacki2022-10-041-0/+1
| | | | | | | | | | | | | | | | 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>
* IntelFsp2Pkg: Add CI YAML fileMichael Kubacki2022-10-041-0/+1
| | | | | | | | | | | | | 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>
* EmbeddedPkg: Add CI YAML fileMichael Kubacki2022-10-031-0/+1
| | | | | | | | | | | | | | | | | 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>
* .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package pathKun Qin2022-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* .pytool/plugin/SpellCheck: Add more common wordsMichael Kubacki2022-05-191-1/+112
| | | | | | | | | | | | 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>
* .pytool/plugin/SpellCheck: Allow compound wordsMichael Kubacki2022-05-191-1/+1
| | | | | | | | | | | | 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>
* .pytool: Fix python command error in self introduction docChao Li2022-05-091-2/+2
| | | | | | | | | | | | | | | | 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>
* .pytool/Plugin/UncrustifyCheck: Add Azure DevOps UI debug instructionsMichael Kubacki2022-04-221-0/+5
| | | | | | | | | | | | 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>
* PrmPkg: Changes for edk2 repo transitionMichael Kubacki2022-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* .pytool/Plugin/UncrustifyCheck: Add ignore file supportMichael Kubacki2022-04-042-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* .pytool/Plugin/UncrustifyCheck: Update func to return absolute pathsMichael Kubacki2022-04-041-1/+6
| | | | | | | | | | | | | | | | | | 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>
* .pytool: Update to newest pytoolsKen Lautner2022-03-0910-11/+11
| | | | | | | | | | | | | 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>
* .pytool/Plugin/UncrustifyCheck: Output file diffs by defaultMichael Kubacki2022-03-082-5/+5
| | | | | | | | | | | | | | | | | | | | | 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>
* .pytool/Plugin/UncrustifyCheck: Add Uncrustify CI pluginMichael Kubacki2021-12-078-0/+1255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>