From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.13819.1593518425250153067 for ; Tue, 30 Jun 2020 05:00:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: shenglei.zhang@intel.com) IronPort-SDR: nwRD66a5BuGKex+So/ahi6WSoxoMMj4aGZ+8f9OxU3laoLWUmnb00NElb96Vp+QfAWENonwurO suA9T0pC0hvw== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="147758012" X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="147758012" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 05:00:23 -0700 IronPort-SDR: 1T2mq7Uu5Yp26GCsOq0CMXU3UyMMIA0oni7E0cmdDcPgm59sJuhdMjDutF6X6a8MUyaU/wMVPA vzWWGfhLTVNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="481165206" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by fmsmga005.fm.intel.com with ESMTP; 30 Jun 2020 05:00:22 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Bob Feng , Bret Barkelew , Michael D Kinney , Liming Gao , Sean Brogan Subject: [PATCH v5 00/15] Add a plugin to check Ecc issues for edk2 on open ci Date: Tue, 30 Jun 2020 20:00:00 +0800 Message-Id: <20200630120015.15456-1-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2606 As planed we will enable Ecc check for edk2 on open ci. And they are ready now. I appreciate receiving feedback and comments if someone find errors or false positive issues. I created a pipline of EccCheck for my forked edk2. https://dev.azure.com/shengleizhang/shengleizhang/_build?definitionId=12&_a=summary And I also created some test cases for ECC plugin. Results can be view in the above pipline. Below are test cases. https://github.com/shenglei10/edk2/tree/ECC Patches 1/15: It's a lib necessary for py3 to run Ecc on azure servers. For local use, we need to type command "py -3 -m pip install antlr4-python3-runtime==4.7.1" first. 2/15: EccCheck.py is a plugin to report Ecc issues for commits. It can be run on azure servers for open ci, or a local virtual environment. 3/15~15/15: We consider some cases that will report out Ecc issues but they won't be fixed, like submodule and industry standard related things. So we add two configuration fields "Exception" and "IgnoreFiles" for people to use. These patches add configuration in yaml files for Ecc check. Cc: Bob Feng Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Cc: Sean Brogan v2: Update 1/17, fix the bug that the script can't hanlde multiple commits. v3: Update 1/17, set the only workalbe workspace is edk2 root directory. Update 2/17, designate the version of antlr4 is 4.7.1. Add 4/17~17/17. v4. Update 1/17, remove the function EdksetupRebuild(), instead add function SetupEnvironment(). Update variables' format and type hints to pass flake8 and mypy. v5. Conver the former method to plugin solution, to align with other check points on open ci. Shenglei Zhang (15): .pytool/Plugin: Add a plugin EccCheck MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for Ecc check CryptoPkg/CryptoPkg.ci.yaml: Add configuration for Ecc check EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for Ecc check FatPkg/FatPkg.ci.yaml: Add configuration for Ecc check FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for Ecc check MdePkg/MdePkg.ci.yaml: Add configuration for Ecc check NetworkPkg/NetworkPkg.ci.yaml: Add configuration for Ecc check OvmfPkg/OvmfPkg.ci.yaml: Add configuration for Ecc check PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for Ecc check SecurityPkg/SecurityPkg.ci.yaml: Add configuration for Ecc check ShellPkg/ShellPkg.ci.yaml: Add configuration for Ecc check UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for Ecc check UnitTestFrameworkPkg: Add configuration for Ecc check in yaml file .pytool/Plugin/EccCheck/EccCheck.py | 268 ++++++++++++++++++ .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml | 11 + .pytool/Plugin/EccCheck/Readme.md | 15 + ArmVirtPkg/ArmVirtPkg.ci.yaml | 11 + CryptoPkg/CryptoPkg.ci.yaml | 11 + EmulatorPkg/EmulatorPkg.ci.yaml | 11 + FatPkg/FatPkg.ci.yaml | 11 + FmpDevicePkg/FmpDevicePkg.ci.yaml | 11 + MdeModulePkg/MdeModulePkg.ci.yaml | 11 + MdePkg/MdePkg.ci.yaml | 11 + NetworkPkg/NetworkPkg.ci.yaml | 11 + OvmfPkg/OvmfPkg.ci.yaml | 11 + PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml | 11 + SecurityPkg/SecurityPkg.ci.yaml | 11 + ShellPkg/ShellPkg.ci.yaml | 11 + UefiCpuPkg/UefiCpuPkg.ci.yaml | 11 + .../UnitTestFrameworkPkg.ci.yaml | 10 + 17 files changed, 447 insertions(+) create mode 100644 .pytool/Plugin/EccCheck/EccCheck.py create mode 100644 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml create mode 100644 .pytool/Plugin/EccCheck/Readme.md -- 2.18.0.windows.1