From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.35339.1670289820474295120 for ; Mon, 05 Dec 2022 17:23:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=IzZo60gz; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 11BE420B6C40; Mon, 5 Dec 2022 17:23:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 11BE420B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1670289819; bh=KWow0w+dJKeVjWhIKIZs3VBuhZiZeTcdhtCZyyQCdsg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IzZo60gzo1W+vzBaIZZSzMXq/6UAUDoayXzOSSFxexgNw8sDKqC4V0yCkvhEIsYpY cqrH6HLYwS2nLa/MxpbGx6h5Bs/ZFInJIQSJImCWgig/KUCNxODpxb1nWN/YoDFRhM RKuUdwjzuXHQyohxzCzVbH/fwh47z8XKRL9HCSaU= Message-ID: <5ef65ca6-886d-7be2-6b5c-07432788b9d0@linux.microsoft.com> Date: Mon, 5 Dec 2022 20:23:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest To: devel@edk2.groups.io, dun.tan@intel.com Cc: Sean Brogan , "Kinney, Michael D" , "Gao, Liming" , "Ni, Ray" References: <20221122114737.393-1-dun.tan@intel.com> <1729E5B1AD6A86B6.31464@groups.io> From: "Michael Kubacki" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sorry for the delay Dun. Can you please share an edk2 pull request with this change? Thanks, Michael On 12/4/2022 10:57 PM, duntan wrote: > Hi all, > Is there anything else I can do to speed up the review process for this patch set? Looking forward to your reply. > > Thanks, > Dun > -----Original Message----- > From: Tan, Dun > Sent: Monday, November 28, 2022 5:34 PM > To: devel@edk2.groups.io; Tan, Dun > Cc: Sean Brogan ; Michael Kubacki ; Kinney, Michael D ; Gao, Liming ; Ni, Ray > Subject: RE: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest > > Hi all, > Could you please help to review this patch? Thanks a lot! > > Thanks, > Dun > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of duntan > Sent: Tuesday, November 22, 2022 7:48 PM > To: devel@edk2.groups.io > Cc: Sean Brogan ; Michael Kubacki ; Kinney, Michael D ; Gao, Liming ; Ni, Ray > Subject: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest > > 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/.azurepipelines/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: '' > > - name: extra_install_step > type: stepList > @@ -49,7 +52,9 @@ steps: > displayName: 'Install/Upgrade pip modules' > > # Set default > -- bash: echo "##vso[task.setvariable variable=pkg_count]${{ 1 }}" > +- bash: | > + echo "##vso[task.setvariable variable=pkg_count]${{ 1 }}" > + echo "##vso[task.setvariable variable=pkgs_to_build]${{ 'all' }}" > > # 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_target}} -a ${{ parameters.build_arch}} --pr-target origin/$(System.PullRequest.targetBranch) --output-count-format-string "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}" > + arguments: -c ${{ parameters.build_file }} -t ${{ > + parameters.build_target}} -a ${{ parameters.build_arch}} --pr-target > + origin/$(System.PullRequest.targetBranch) --output-count-format-string > + "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}" > + --output-csv-format-string "##vso[task.setvariable > + variable=pkgs_to_build]{pkgcsv}" ${{ parameters.unit_test_list}} > condition: eq(variables['Build.Reason'], 'PullRequest') > > # Setup repo > @@ -97,14 +102,22 @@ steps: > inputs: > filename: stuart_build > arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} > - condition: and(gt(variables.pkg_count, 0), succeeded()) > + condition: and(and(gt(variables.pkg_count, 0), succeeded()), > + eq(variables.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=${{ > +parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ > +parameters.build_arch}} ${{ parameters.build_flags}} > + condition: and(and(gt(variables.pkg_count, 0), succeeded()), > +not(eq(variables.unit_test_list, ''))) > > # Run > - task: CmdLine@1 > displayName: Run to shell > inputs: > filename: stuart_build > - arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }} --FlashOnly > + arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=${{ > + parameters.tool_chain_tag}} TARGET=${{ parameters.build_target}} -a > + ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ > + parameters.run_flags }} --FlashOnly ${{ parameters.unit_test_list}} > condition: and(and(gt(variables.pkg_count, 0), succeeded()), eq(variables['Run'], true)) > timeoutInMinutes: 1 > > -- > 2.31.1.windows.1 > > > > > > > > > >