From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.13168.1592210936576771257 for ; Mon, 15 Jun 2020 01:48:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: shenglei.zhang@intel.com) IronPort-SDR: 7swPeZTQRcjQLBfjHizPPdT992hDfc0M6DcyxIhJ5u0FrWI4y0+NplaD8TLPqzX/drWB6laZVs d2jfkmNJ4j4w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2020 01:48:55 -0700 IronPort-SDR: bBRLPHIPKKYsoUwEB++f3Qo+vX+Kgs8ovOPfnzI5X4FKA6LylLVm41vDTYUH86mvvdQVG+iK6X 3ltpvjzXz1vg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,514,1583222400"; d="scan'208";a="475950983" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by fmsmga005.fm.intel.com with ESMTP; 15 Jun 2020 01:48:54 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Bob Feng , Bret Barkelew , Michael D Kinney , Liming Gao , Sean Brogan Subject: [PATCH v4 00/17] Add a pipline to check Ecc issues for edk2 on open ci Date: Mon, 15 Jun 2020 16:48:32 +0800 Message-Id: <20200615084849.120708-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, but these are V3 series. So I expect that contributors in edk2 community can try using this script when reviewing. And 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=10&_a=summary The patch series are big, so the commits are also pushed into my forked tree. https://github.com/shenglei10/edk2/commits/ECC Patches 1/17: EccCheck.py is a tool to report Ecc issues for commits. It can be run on azure servers for open ci, or locally. Its usage is like PatchCheck.py. 2/17: 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. 3/17: Windows-EccCheck.yml is a yaml file to configure the newly added pipline. Azure uses this to create a pipline. 4/17~17/17: 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. Shenglei Zhang (17): BaseTools/Scripts: Add EccCheck.py pip-requirements.txt: Add Ecc required lib .azurepiplines: Add a pipline to check ECC issues for commits 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 .azurepipelines/Windows-EccCheck.yml | 38 ++ ArmVirtPkg/ArmVirtPkg.ci.yaml | 10 + BaseTools/Scripts/EccCheck.py | 419 ++++++++++++++++++ CryptoPkg/CryptoPkg.ci.yaml | 10 + EmulatorPkg/EmulatorPkg.ci.yaml | 10 + FatPkg/FatPkg.ci.yaml | 10 + FmpDevicePkg/FmpDevicePkg.ci.yaml | 10 + MdeModulePkg/MdeModulePkg.ci.yaml | 10 + MdePkg/MdePkg.ci.yaml | 10 + NetworkPkg/NetworkPkg.ci.yaml | 10 + OvmfPkg/OvmfPkg.ci.yaml | 10 + PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml | 10 + SecurityPkg/SecurityPkg.ci.yaml | 10 + ShellPkg/ShellPkg.ci.yaml | 10 + UefiCpuPkg/UefiCpuPkg.ci.yaml | 10 + .../UnitTestFrameworkPkg.ci.yaml | 10 + pip-requirements.txt | 1 + 17 files changed, 598 insertions(+) create mode 100644 .azurepipelines/Windows-EccCheck.yml create mode 100644 BaseTools/Scripts/EccCheck.py -- 2.18.0.windows.1