From nobody Sat Feb 7 03:08:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+96550+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+96550+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1669117688; cv=none; d=zohomail.com; s=zohoarc; b=cLpfbY3tfmz3VMq3GAdQTxWNSq/9HCPPSu9rybP4QENO7T332DYqUu0f0W9vba3XtOrAknniv/XHJaXdEEFkDjIRVxE87XzA3vOefXR8oEdhyVd9Li7xgNrf0vt+yc5ns5xl5KiTZ1r2Wt7XC4m8BO5U4CQ1LgbztZ3AKVz4sl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669117688; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=8moTpmqaGDNssQZPUKem786w0ZkhRe+WpTQNwbUQL6A=; b=A3P/E/DPyAZEAwytwrCRfdAJWyOv6XGQYIp6ziIMmO+NxuyWMrxfxr+pNQKF3tli5pSx+v8cI1zuMxrKh6KT1kMlO5KcVFhZYC/goUrdZwhm7HyQ1uvMBqixo6b5qiJH9TfNms7uxp0eHOwwaEiG/WWJ9luDoXLwKwH07Z4eol8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+96550+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669117688880680.1528090297444; Tue, 22 Nov 2022 03:48:08 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id KJxGYY1788612xPJ8AmvPZKI; Tue, 22 Nov 2022 03:48:08 -0800 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.16865.1669117674960617993 for ; Tue, 22 Nov 2022 03:48:08 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="293505523" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="293505523" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 03:48:07 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="592118864" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="592118864" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.56.220]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 03:48:06 -0800 From: "duntan" To: devel@edk2.groups.io Cc: Sean Brogan , Michael Kubacki , Michael D Kinney , Liming Gao , Ray Ni Subject: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest Date: Tue, 22 Nov 2022 19:47:37 +0800 Message-Id: <20221122114737.393-4-dun.tan@intel.com> In-Reply-To: <20221122114737.393-1-dun.tan@intel.com> References: <20221122114737.393-1-dun.tan@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,dun.tan@intel.com X-Gm-Message-State: qiIFM8kjKZzDjj7hFhnV5vTKx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669117688; bh=IynlNv5wSrdyZYGxOzq1izN3ENJW29ZBZpF3emc37ZU=; h=Cc:Date:From:Reply-To:Subject:To; b=DZyt0J2D57WMp6YjoSWePcwAnJyVeC69sjOs15niYPZotZpnWMKbHgp39Ke4LyfwTDu Bq7Z/LGcEXd5wv27d9HStwas9p4QS/tbaVjVavd6zm7FnvgOa/sB8y7VO3siB9KCFUHKP KdP9hdsYnTeg+PqYYO+l69/AeqWsUU8BPOw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669117689460100001 Content-Type: text/plain; charset="utf-8" Expand PlatformCI build and run steps template for Shell UnitTest. Add a new parameter unit_test_list to support building and running specific Shell UnitTest modules. In stuart_pr_eval step, if the unit_test_list passed from platform yml file is not null, it will select some packages from the packages which contain the module in unit_test_list and set them into a new variable pkgs_to_build base on its evaluation rule. In stuart_build step, if unit_test_list is not null, '${{ parameters.unit_test_list}} -p $(pkgs_to_build)' will be added into the arguments to build specific UnitTest modules in pkgs_to_build. In 'Run to shell' step, if unit_test_list is not null, all the UnitTest modules built in stuart_build step will runs in shell. Signed-off-by: Dun Tan Cc: Sean Brogan Cc: Michael Kubacki Cc: Michael D Kinney Cc: Liming Gao Cc: Ray Ni --- .azurepipelines/templates/platform-build-run-steps.yml | 21 ++++++++++++++= +++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.azurepipelines/templates/platform-build-run-steps.yml b/.azur= epipelines/templates/platform-build-run-steps.yml index 40a31a509f..51503287c4 100644 --- a/.azurepipelines/templates/platform-build-run-steps.yml +++ b/.azurepipelines/templates/platform-build-run-steps.yml @@ -30,6 +30,9 @@ parameters: - name: run_flags type: string default: '' +- name: unit_test_list + type: string + default: '' =20 - name: extra_install_step type: stepList @@ -49,7 +52,9 @@ steps: displayName: 'Install/Upgrade pip modules' =20 # Set default -- bash: echo "##vso[task.setvariable variable=3Dpkg_count]${{ 1 }}" +- bash: | + echo "##vso[task.setvariable variable=3Dpkg_count]${{ 1 }}" + echo "##vso[task.setvariable variable=3Dpkgs_to_build]${{ 'all' }}" =20 # Fetch the target branch so that pr_eval can diff them. # Seems like azure pipelines/github changed checkout process in nov 2020. @@ -62,7 +67,7 @@ steps: displayName: Check if ${{ parameters.build_pkg }} need testing inputs: filename: stuart_pr_eval - arguments: -c ${{ parameters.build_file }} -t ${{ parameters.build_tar= get}} -a ${{ parameters.build_arch}} --pr-target origin/$(System.PullReques= t.targetBranch) --output-count-format-string "##vso[task.setvariable variab= le=3Dpkg_count;isOutpout=3Dtrue]{pkgcount}" + arguments: -c ${{ parameters.build_file }} -t ${{ parameters.build_tar= get}} -a ${{ parameters.build_arch}} --pr-target origin/$(System.PullReques= t.targetBranch) --output-count-format-string "##vso[task.setvariable variab= le=3Dpkg_count;isOutpout=3Dtrue]{pkgcount}" --output-csv-format-string "##v= so[task.setvariable variable=3Dpkgs_to_build]{pkgcsv}" ${{ parameters.unit_= test_list}} condition: eq(variables['Build.Reason'], 'PullRequest') =20 # Setup repo @@ -97,14 +102,22 @@ steps: inputs: filename: stuart_build arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=3D${{ parame= ters.tool_chain_tag}} TARGET=3D${{ parameters.build_target}} -a ${{ paramet= ers.build_arch}} ${{ parameters.build_flags}} - condition: and(gt(variables.pkg_count, 0), succeeded()) + condition: and(and(gt(variables.pkg_count, 0), succeeded()), eq(variable= s.unit_test_list, '')) + +# Build specific pkg for UnitTest +- task: CmdLine@1 + displayName: Build UnitTest + inputs: + filename: stuart_build + arguments: ${{ parameters.unit_test_list}} -p $(pkgs_to_build) -c ${{ = parameters.build_file }} TOOL_CHAIN_TAG=3D${{ parameters.tool_chain_tag}} T= ARGET=3D${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ pa= rameters.build_flags}} + condition: and(and(gt(variables.pkg_count, 0), succeeded()), not(eq(vari= ables.unit_test_list, ''))) =20 # Run - task: CmdLine@1 displayName: Run to shell inputs: filename: stuart_build - arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=3D${{ parame= ters.tool_chain_tag}} TARGET=3D${{ parameters.build_target}} -a ${{ paramet= ers.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} -= -FlashOnly + arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=3D${{ parame= ters.tool_chain_tag}} TARGET=3D${{ parameters.build_target}} -a ${{ paramet= ers.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} -= -FlashOnly ${{ parameters.unit_test_list}} condition: and(and(gt(variables.pkg_count, 0), succeeded()), eq(variable= s['Run'], true)) timeoutInMinutes: 1 =20 --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#96550): https://edk2.groups.io/g/devel/message/96550 Mute This Topic: https://groups.io/mt/95193616/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-