From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CY4PR02CU008-vft-obe.outbound.protection.outlook.com (CY4PR02CU008-vft-obe.outbound.protection.outlook.com [40.93.200.18]) by mx.groups.io with SMTP id smtpd.web11.4433.1670539025441023912 for ; Thu, 08 Dec 2022 14:37:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=KCbBURU+; spf=pass (domain: microsoft.com, ip: 40.93.200.18, mailfrom: sean.brogan@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqmfeV22qVF9Ws9ith14fK12Esr3j52g5VvNkGBWJKOa52vDq872txsQFo+KwNoqNjQoiWsSLjppweXSs1wkmxkau+MqVKnpb4o4NpX6Pfl3zSnLgkyXm0C7gm7jUN5mJCrUWq6RO5BFw4jfX43mhLlKcUyW3SvvhquuOIJ+S+pG+xRoIUQ56lkOE0oCLanSPfPk9labWSF2coo5ox6D9BHU0ab6P+ElMh7Si4dd5RizEufWIzFddyjNt5AuHTC8KyNaxktZQahzjykgPDWykTerlnu7XPKDsF/CvDq9hKRBE2nOmveM39mw2mpEiB2OgFFvCLigCkOiVgEoWDQpyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Pl+vXX62yZz+pvl63WZDf4AV6T3/rq0YonKD7pXNfQU=; b=kDNqDEOJFPLYlf8iFHmRmpdHz5EiTOG89yVri5vUSlrh+udOXfO/hiUKanHngBVJjY5RRK6mF7VmDQ2Gq5mQY0gjwi4Zc4kpaWbAZV7/vK7bmwnd/Yq0IaiNz1Mo3f+3nffNSMxLc9kzib38lPUuGyqWqRs4BySlNtLxhNV2x7bonapcnQM7l17mQAXCbRxgjZ75GCHMOr+XBUaYX64CxRsZToHtbmbmCvM797Mdax21P7uu/nT0qfWQ3dJQtuoCrpj6A5yAMXKr/Y5W8LD7y8H0Xe4jAeqCLOescw1BMV4vVELGD6RcksNNcYeRBlpFHyeGs1g3oRvdR/hPBUuhrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Pl+vXX62yZz+pvl63WZDf4AV6T3/rq0YonKD7pXNfQU=; b=KCbBURU+bmIh/wDWuKnvOeXncDptFMscAZMS727LfjXA51Wx1PK2MGzZBrB03yXnRzI7BdnjVBkwjs6YjlSmBMkPwlzuapNe39dFYNWcSLjiyVgSJ3OfGAcm6UrKHB3znDX3CRsoqEHu2OQVwOH+JyxRWiBcsb+zBpn0pMpOS/0= Received: from DM6PR21MB1499.namprd21.prod.outlook.com (2603:10b6:5:22d::7) by CY5PR21MB3468.namprd21.prod.outlook.com (2603:10b6:930:f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.5; Thu, 8 Dec 2022 22:37:02 +0000 Received: from DM6PR21MB1499.namprd21.prod.outlook.com ([fe80::521:698f:63c6:e399]) by DM6PR21MB1499.namprd21.prod.outlook.com ([fe80::521:698f:63c6:e399%5]) with mapi id 15.20.5924.004; Thu, 8 Dec 2022 22:37:02 +0000 From: Sean Brogan To: "Tan, Dun" , Michael Kubacki , "devel@edk2.groups.io" CC: "Kinney, Michael D" , "Gao, Liming" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest Thread-Topic: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest Thread-Index: AQHY/mhQafQCh/tB5USXUEAXEUkBHq5UG2DAgAqgsFCAAWnagIAALTOggAMRpICAAFcRkIAA8gzB Date: Thu, 8 Dec 2022 22:37:02 +0000 Message-ID: References: <20221122114737.393-1-dun.tan@intel.com> <1729E5B1AD6A86B6.31464@groups.io> <5ef65ca6-886d-7be2-6b5c-07432788b9d0@linux.microsoft.com> <6220396f-5602-d23a-ad74-4e455ebf28a8@linux.microsoft.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-12-08T22:37:00.735Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR21MB1499:EE_|CY5PR21MB3468:EE_ x-ms-office365-filtering-correlation-id: f670b730-aa41-45cf-8306-08dad96cb9a9 x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ubyKuA7RrezNWAWzcnAQx0dDXEms8T9QZ/hW3T5Iww4SCLjb/y38e+rA1eHU+HIfBOq1xQwZEXnQIrp2GLnJ2Ol2HgxHW08KvVeBDVLbTor0wYPSyriEHyzrHB9Qlj3/wx1eZ+lVTft1s2sIMjFfqtTcCEdRHpcOY25aV24cnI6fzGkHbuW4zJfUwTbsKhdJ1bXTeH88FLzmMTRcoNyOWEo2J6M/3nPthNHIaPn2Qb9UUgZ6v2Yex2rEHv8xCRKjLkWJVTAZyWBV4xN2QJ3zLE+1mK+E7HqVgTp33ou4HdRzhcqwk33s4uFi671vpRqIkFK3PsVVd7iFubqkyGJNXY8cHXNNOxfkvNfiMiOkRXHZ/+ztuaz+tX/teKnJuDIVayz4cQK2BJOLVo/5Nzq1e218QIgZYyM4/Ze9e9cuVvaC6Zk4vGfc+ilPar0rOghwed7KI2EmWhAz9rqoANWmzuLja8Mc3yLRdnJahJ5o9/+zUQjfxeYxq6jnGBCpr/8jgo4juWZTE7I2gFJeVpQ8y8ztP6fDxW+jieQqrt1uLQdwv56bQY7E5drXjQyMyH5o4nF/vbwb8eGCsjWMDzJQcAuc82UQfcDUjyq515KNxsYJKL51ZzLV+6dTxNIW3DEwI9lPYlrU5HyJiK9InfqaRM8uwVcxx4o+5DCmtW7imnuKzeMscCrT1wxaHwfoMJcv2KygUN96PWrfyKX9PWQ1luJRCfPZ7UPhy9IHH1i6h+co9ySd+IYu9D+HL9tfMQqgi3Qo+pnpJc9zh80txb+5qEd0fsUc+f/NMz6Xl8+mjWPnwAtlaT3MUSVskvbpR9MZ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR21MB1499.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(376002)(366004)(136003)(39860400002)(346002)(451199015)(1690799008)(10290500003)(2906002)(9686003)(26005)(38100700002)(53546011)(6506007)(7696005)(82950400001)(66446008)(82960400001)(66476007)(66556008)(64756008)(71200400001)(8676002)(76116006)(52536014)(8936002)(66946007)(4326008)(41300700001)(186003)(86362001)(91956017)(110136005)(316002)(5660300002)(83380400001)(44832011)(54906003)(38070700005)(33656002)(166002)(55016003)(30864003)(8990500004)(122000001)(19627405001)(19627235002)(478600001)(966005)(66899015);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?phIrNhxtmUslIfIITXUX9TatbEGZmOTE45NQZfK/9koqddyMThOo5qlVT3?= =?iso-8859-1?Q?nqNTSyq2rdWYsvhWUOZtuwZWBjU/Rg9VayENEegh34rff2QLJFA4wQ8x9+?= =?iso-8859-1?Q?mZpbnf5EPnZC9UWhpzyhNG6TLNMMTAR4Eh/Iyx9yZKtLhfIKHPNb06NslP?= =?iso-8859-1?Q?fyx4P04HrsK2XMWKOr7/S2CF45aARF3ETUfGIcqOGMTLddruG6ZT07C81f?= =?iso-8859-1?Q?ab+gRVx3QuThX4xudCywgVPzeHAQZ8SX3beXzAgG7wYwy86cQ+HDAnTKPb?= =?iso-8859-1?Q?w9kb/hPTxhxvuQo3jDD29ubaBdXLo5ujPetM8beT8xZ0bJlscn/iRespB/?= =?iso-8859-1?Q?ZvrbdWz7gsHr9cpN+NcoAfW1jezj4tIR90RWEkNfrzWxyZXwbZMwOXkCsf?= =?iso-8859-1?Q?f5bKQ/UUXSappLviI3u0JmMSYmKpn+W06INm7TDkDRvC+tOTc/mha81UdD?= =?iso-8859-1?Q?Cgxw5KFkwUP3I5k+x3KR457nEAdlPoPTkrzvB4XML3sjqbhVU3X3cHoNHO?= =?iso-8859-1?Q?Ud53vo2j0je3tFya7N5d2fxNCsmSY5a1ztUYPz42gjcF+WOa0r9AE+9IVw?= =?iso-8859-1?Q?FVyESgRSAOXBnN0/4prERlr9BQAiTiB4xMnjQfveaSjKYrrWKTE+ARjhew?= =?iso-8859-1?Q?ECLlxKnx8E6E/al8mVTNH21tSa1pzp3WEGUzSCE7USQDgmv3mfoDwAkarQ?= =?iso-8859-1?Q?rqLgt08tOqOdrrnSY7W1Foo09bNy6I+9GFMtuUIcNIyM3Hvpg+UAGkpKvs?= =?iso-8859-1?Q?baPFZkgxH/uWrbt/9gjBZg7LOZYurl7/A6+sR0U1huAmbr+SGeRpYpG95P?= =?iso-8859-1?Q?MPvoPxxgdrLzm6l8ezATA8BS5UBsppMOxabPsOM+WSovj4RQUc1CTF8OUz?= =?iso-8859-1?Q?tsEGqt2jpJtURchiLhlopmkZHQWuwj/6LdmB6WOtISzysNP+5Zk2dWV8dj?= =?iso-8859-1?Q?0rDK9CxhUw0iQVmQ2d3A5a3ZTj8Hgy9fEBPbxmv2b1RISmxTfCEiQ1yOXx?= =?iso-8859-1?Q?5GlTIYvhajWldfKZ7ThCbwbxTTduminGvQ4jGpWIgsyN7JaFtk1jUMOya4?= =?iso-8859-1?Q?zt4TwV1r8Yeb0FnfA1b0AFVWd8mIzHcHSLR4Cd1Zibv2PruuarJb9fflcD?= =?iso-8859-1?Q?pk7wcvK/1kIwGFvQKY1nBl/aWpIpq5aS3ptx0z1AxhKDO0E69+zsTDv/EM?= =?iso-8859-1?Q?khcAoZo+TFcnX7fPNtbscZna37JfsE1mxB7B12pzPs5HV4gu2wq79mMKQL?= =?iso-8859-1?Q?5iaWnrnWzwU41Cc9z0gPKxeicZWfVO3i435BbmHVEj/9OQuiiF1y0yZoTv?= =?iso-8859-1?Q?MDQ86VzNDBqwP5BkGxQ88XI93pya9uSJboThbvtKViRcnBYOQihV7oyI34?= =?iso-8859-1?Q?Hb6IOOmEHIn72dRG60BSK0d99156K2YlVYMNC0Cs11W4dFowIOxtPMzlSz?= =?iso-8859-1?Q?h+ZRom87ZKAGd7HUCQ+tQueJr3VafyQqmUKr8pzSVaxAkBkmG9S0vzu4zV?= =?iso-8859-1?Q?klEHeNk9Ok3nClUqBHBhjyf64opAL/MA4Su4Qm9irhfzVnKoYRIz/U/LOq?= =?iso-8859-1?Q?r7sI8kke2ljrJSBAt9di6QKFMk8VHaSdqnTnfqItnPszCZQPWAn5cnRlfw?= =?iso-8859-1?Q?pOmAyAu+X557ms6gtsK1umU/zklN0OQsiK?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1499.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f670b730-aa41-45cf-8306-08dad96cb9a9 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2022 22:37:02.0780 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: u2/yfF7VJ40IXZg5/obqgAtSI87L2r812ZmSMXzntsybX4T5v1ojCFF2MxCdqZyfwMwcaQn2657VBUpElp2SzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR21MB3468 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DM6PR21MB14997A6704B2AF5D6511AA1DE11D9DM6PR21MB1499namp_" --_000_DM6PR21MB14997A6704B2AF5D6511AA1DE11D9DM6PR21MB1499namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dun, I created this discussion on github hoping that others might have ideas/fee= dback. Integrate target-based testing into Platform CI for Edk2 using OVMF =B7 Dis= cussion #3739 =B7 tianocore/edk2 (github.com) Lets use that to discuss and then on monday we can talk more if needed. Thanks Sean [https://opengraph.githubassets.com/1743f87e9d9139f88783fef5e0cdeb31d956f01= 6a4ea69c0c5489778f4834eb7/tianocore/edk2/discussions/3739] Integrate target-based testing into Platform CI for Edk2 using OVMF =B7 Dis= cussion #3739 =B7 tianocore/edk2 Starting a discussion here to see if more individuals in the community have= opinions on how best to integrate target-based testing into edk2 CI. There= is a current proposed patch on the mailing lis... github.com ________________________________ From: Tan, Dun Sent: Thursday, December 8, 2022 12:17 AM To: Michael Kubacki ; devel@edk2.groups.io Cc: Sean Brogan ; Kinney, Michael D ; Gao, Liming ; Ni, Ray Subject: [EXTERNAL] RE: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand Pl= atformCI template for Shell UnitTest Thank you and Sean a lot! I'll attend the CI meeting if there is any open. Thanks, Dun -----Original Message----- From: Michael Kubacki Sent: Thursday, December 8, 2022 10:57 AM To: devel@edk2.groups.io; Tan, Dun Cc: Sean Brogan ; Kinney, Michael D ; Gao, Liming ; Ni, Ray Subject: Re: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI te= mplate for Shell UnitTest Hi Dun, Sean Brogan and I have some feedback we'll send soon after we sync on it. I= f anything is still open as of the upcoming TianoCore tools & CI meeting an= d you're able to attend, we can talk there as well. Thanks, Michael On 12/5/2022 11:46 PM, duntan wrote: > Hi Michael, > Thanks for the reply! In the following PR, I added an unit test list in t= he new OvmfPkg platform CI JOB. In PlatformCI_OvmfPkg_Ubuntu_GCC5_PR and P= latformCI_OvmfPkg_Windows_VS2019_PR, the CI for specific unit test list was= triggered. > https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithu= b.com%2Ftianocore%2Fedk2%2Fpull%2F3651&data=3D05%7C01%7Csean.brogan%40micro= soft.com%7C884211b3375b4f0618de08dad8f4bdea%7C72f988bf86f141af91ab2d7cd011d= b47%7C1%7C0%7C638060842928005678%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD= AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3D%2= FPbU3fGHlHv5%2FlKn8tvUdEO6%2Ff2SjCAzc7u2KVRxyK0%3D&reserved=3D0 > > Thanks, > Dun > > -----Original Message----- > From: Michael Kubacki > Sent: Tuesday, December 6, 2022 9:24 AM > To: devel@edk2.groups.io; Tan, Dun > Cc: Sean Brogan ; Kinney, Michael D > ; Gao, Liming ; > Ni, Ray > Subject: Re: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand > PlatformCI template for Shell UnitTest > > Sorry for the delay Dun. Can you please share an edk2 pull request with t= his 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 Shel= l UnitTest modules. >> >> In stuart_pr_eval step, if the unit_test_list passed from platform yml f= ile is not null, it will select some packages from the packages which conta= in the module in unit_test_list and set them into a new variable pkgs_to_bu= ild base on its evaluation rule. >> In stuart_build step, if unit_test_list is not null, '${{ parameters.uni= t_test_list}} -p $(pkgs_to_build)' will be added into the arguments to buil= d 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=3Dpkg_count]${{ 1 }}" >> +- bash: | >> + echo "##vso[task.setvariable variable=3Dpkg_count]${{ 1 }}" >> + echo "##vso[task.setvariable variable=3Dpkgs_to_build]${{ 'all' }}" >> >> # Fetch the target branch so that pr_eval can diff them. >> # Seems like azure pipelines/github changed checkout process in nov 2= 020. >> @@ -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.PullReq= uest.targetBranch) --output-count-format-string "##vso[task.setvariable var= iable=3Dpkg_count;isOutpout=3Dtrue]{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=3Dpkg_co= unt;isOutpout=3Dtrue]{pkgcount}" >> + --output-csv-format-string "##vso[task.setvariable >> + variable=3Dpkgs_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=3D${{ >> parameters.tool_chain_tag}} TARGET=3D${{ 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=3D${{ >> +parameters.tool_chain_tag}} TARGET=3D${{ 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=3D${{ par= ameters.tool_chain_tag}} TARGET=3D${{ parameters.build_target}} -a ${{ para= meters.build_arch}} ${{ parameters.build_flags}} ${{ parameters.run_flags }= } --FlashOnly >> + arguments: -c ${{ parameters.build_file }} TOOL_CHAIN_TAG=3D${{ >> + parameters.tool_chain_tag}} TARGET=3D${{ 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(var= iables['Run'], true)) >> timeoutInMinutes: 1 >> >> -- >> 2.31.1.windows.1 >> >> >> >> >> >> >> >> >> >> > > >=20 > > --_000_DM6PR21MB14997A6704B2AF5D6511AA1DE11D9DM6PR21MB1499namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dun,

I created this discussion = on github hoping that others might have ideas/feedback.  

Lets use that to discuss and then on monday we can talk more if needed.&nbs= p;

Thanks
Sean


=3D""
Starting a discussion here to see if more individuals in the community have= opinions on how best to integrate target-based testing into edk2 CI. There= is a current proposed patch on the mailing lis...
github.com


From: Tan, Dun <dun.tan@= intel.com>
Sent: Thursday, December 8, 2022 12:17 AM
To: Michael Kubacki <mikuback@linux.microsoft.com>; devel@edk2= .groups.io <devel@edk2.groups.io>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Kinney, Michael D= <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.= cn>; Ni, Ray <ray.ni@intel.com>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH 3/3] .azurepipelines: Ex= pand PlatformCI template for Shell UnitTest
 
Thank you and Sean a lot! I'll attend the CI meeti= ng if there is any open.

Thanks,
Dun
-----Original Message-----
From: Michael Kubacki <mikuback@linux.microsoft.com>
Sent: Thursday, December 8, 2022 10:57 AM
To: devel@edk2.groups.io; Tan, Dun <dun.tan@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Kinney, Michael D <mi= chael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>;= Ni, Ray <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI te= mplate for Shell UnitTest

Hi Dun,

Sean Brogan and I have some feedback we'll send soon after we sync on it. I= f anything is still open as of the upcoming TianoCore tools & CI meetin= g and you're able to attend, we can talk there as well.

Thanks,
Michael

On 12/5/2022 11:46 PM, duntan wrote:
> Hi Michael,
> Thanks for the reply! In the following PR, I added an unit test list i= n the new OvmfPkg platform CI JOB. In  PlatformCI_OvmfPkg_Ubuntu_GCC5_= PR and PlatformCI_OvmfPkg_Windows_VS2019_PR, the CI for specific unit test = list was triggered.
> https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Ftianocore%2Fedk2%2Fpull%2F3651&data=3D05%7C01%7Csean.brogan%40mic= rosoft.com%7C884211b3375b4f0618de08dad8f4bdea%7C72f988bf86f141af91ab2d7cd01= 1db47%7C1%7C0%7C638060842928005678%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw= MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdat= a=3D%2FPbU3fGHlHv5%2FlKn8tvUdEO6%2Ff2SjCAzc7u2KVRxyK0%3D&reserved=3D0
>
> Thanks,
> Dun
>
> -----Original Message-----
> From: Michael Kubacki <mikuback@linux.microsoft.com>
> Sent: Tuesday, December 6, 2022 9:24 AM
> To: devel@edk2.groups.io; Tan, Dun <dun.tan@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Kinney, Michael D <= br> > <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.= com.cn>;
> Ni, Ray <ray.ni@intel.com>
> Subject: Re: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand
> PlatformCI template for Shell UnitTest
>
> Sorry for the delay Dun. Can you please share an edk2 pull request wit= h 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 <dun.tan@intel.com>
>> Cc: Sean Brogan <sean.brogan@microsoft.com>; Michael Kubacki=
>> <mikuback@linux.microsoft.com>; Kinney, Michael D
>> <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byos= oft.com.cn>;
>> Ni, Ray <ray.ni@intel.com>
>> 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 <devel@edk2.groups.io> On Behalf = Of duntan
>> Sent: Tuesday, November 22, 2022 7:48 PM
>> To: devel@edk2.groups.io
>> Cc: Sean Brogan <sean.brogan@microsoft.com>; Michael Kubacki=
>> <mikuback@linux.microsoft.com>; Kinney, Michael D
>> <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byos= oft.com.cn>;
>> Ni, Ray <ray.ni@intel.com>
>> Subject: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand Platform= CI
>> 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 specifi= c 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, '${{ paramete= rs.unit_test_list}} -p $(pkgs_to_build)' will be added into the arguments t= o build specific UnitTest modules in pkgs_to_build.
>> In 'Run to shell' step, if unit_test_list is not null, all the Uni= tTest modules built in stuart_build step will runs in shell.
>>
>> Signed-off-by: Dun Tan <dun.tan@intel.com>
>> 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: Ray Ni <ray.ni@intel.com>
>> ---
>>    .azurepipelines/templates/platform-build-run-ste= ps.yml | 21 +++++++++++++++++----
>>    1 file changed, 17 insertions(+), 4 deletions(-)=
>>
>> diff --git a/.azurepipelines/templates/platform-build-run-steps.ym= l
>> 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 mo= dules'
>>   
>>    # Set default
>> -- bash: echo "##vso[task.setvariable variable=3Dpkg_count]${= { 1 }}"
>> +- bash: |
>> +    echo "##vso[task.setvariable variable=3Dp= kg_count]${{ 1 }}"
>> +    echo "##vso[task.setvariable variable=3Dp= kgs_to_build]${{ 'all' }}"
>>   
>>    # Fetch the target branch so that pr_eval can di= ff them.
>>    # Seems like azure pipelines/github changed chec= kout 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 or= igin/$(System.PullRequest.targetBranch) --output-count-format-string "= ##vso[task.setvariable variable=3Dpkg_count;isOutpout=3Dtrue]{pkgcount}&quo= t;
>> +    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 variab= le=3Dpkg_count;isOutpout=3Dtrue]{pkgcount}"
>> + --output-csv-format-string "##vso[task.setvariable
>> + variable=3Dpkgs_to_build]{pkgcsv}" ${{ parameters.unit_test= _list}}
>>      condition: eq(variables['Build.Reaso= n'], 'PullRequest')
>>   
>>     # Setup repo
>> @@ -97,14 +102,22 @@ steps:
>>      inputs:
>>        filename: stuart_build >>        arguments: -c ${{ parame= ters.build_file }} TOOL_CHAIN_TAG=3D${{
>> parameters.tool_chain_tag}} TARGET=3D${{ 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=3D${{
>> +parameters.tool_chain_tag}} TARGET=3D${{ 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 }} TOO= L_CHAIN_TAG=3D${{ parameters.tool_chain_tag}} TARGET=3D${{ parameters.build= _target}} -a ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ p= arameters.run_flags }} --FlashOnly
>> +    arguments: -c ${{ parameters.build_file }} TOO= L_CHAIN_TAG=3D${{
>> + parameters.tool_chain_tag}} TARGET=3D${{ parameters.build_target= }} -a
>> + ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{ >> + parameters.run_flags }} --FlashOnly ${{ parameters.unit_test_lis= t}}
>>      condition: and(and(gt(variables.pkg_= count, 0), succeeded()), eq(variables['Run'], true))
>>      timeoutInMinutes: 1
>>   
>> --
>> 2.31.1.windows.1
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
--_000_DM6PR21MB14997A6704B2AF5D6511AA1DE11D9DM6PR21MB1499namp_--