From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.113842.1669628055419357003 for ; Mon, 28 Nov 2022 01:34:15 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=V6gvPzi9; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: dun.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669628055; x=1701164055; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=AitjJW00dZvoiYnHzm5e5Ur8MaJNp+rWGhj6xh6r3aM=; b=V6gvPzi9DdzugDaJvxUIJrkTF45vCVPrY6KhJRhNlHrJGwbD3adrGZ3I dfhaqlLOACeersPN1WWISwSDCwArOxz1KEx4zcEg6O6rlf8KZWes+mH2R YZtfGlPgnblxGPJfRO8AyrD78CZRXu0AXOiMc/6hHv+6ZHqNIgGqkrRwe CZ24T1iFhJwWVEwm5vImZEJcG1Z45/2lft33X3Fjjpf3THpk2jitsfSEq iN0MhjjuKn6fugOyRYzW13k58OLPMQKkY25TVd6rLw52vNgeH/o+YciUy aqUMo0A3dEVqPTbL+JbK/sdEg5BXnFr1mY+NkY0NpmsjNvHb4OLIY0s/k g==; X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="314826247" X-IronPort-AV: E=Sophos;i="5.96,200,1665471600"; d="scan'208";a="314826247" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2022 01:34:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="888350609" X-IronPort-AV: E=Sophos;i="5.96,200,1665471600"; d="scan'208";a="888350609" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 28 Nov 2022 01:34:14 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 28 Nov 2022 01:34:14 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 28 Nov 2022 01:34:14 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 28 Nov 2022 01:34:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bC9M1iRuPu2O44w2/mOWINt6EoYxlt4BM2zu9j7deO40UgkoB5Hey8h731KNwwn5SoDd0Jl5xGV3d4HtCjGDc39k353kTQJ7cLldk643nQb4iSel6aCPiDKIZjUv8WG396M4K94Ts+90vLiFBJl9xhxxdSjBO6kVqRNZL3zlO8LmNBwujGA9BEoReFFOfJcQTa6F5mWNpOJgIV82JKW5P4Zc68R0yYDkpazqU6DrnWe7fp+64NJIaxa4WnRtGJuX4+pTEl9UWm4iPIw4oG2ZmdbfsPxkDDEqvzL6K8OedpKjD7YvvGMYmM/ZCKT/Syvnm4Gk/7Ekuq65RqlMkVrRRg== 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=e6ySR37t5eXIKTHlrdvudiJMZxVCPJ5SQ3zlnIfjPjw=; b=PWWay2ToHJ7v2JEhIkn62pdbwmVzMKNuWjbtGy+CWZ7w4ZceUQAMEcyWYry7k1I9coM5daP9jQmWnf3Gw0X6fQX4SD24RLpOSKQfzBFdyE2IgDzhJ+U2Yy3MYZ51j/T1fbIka8lxlZiaQn5CBbnrdmIl4tq2wWwEfkype1J26sXLKJqG84/trn8qOqPxVeYIe12BxaNcKV62fYR5O5Bo+Cv201m45lvAhbuqqTlLFHKHGS+Ir0LXAys+TlOx4hoaRXCDESaxKP2HGwcyf724Nbev8YuF+0mhM4+AZiff49iGjqqnVhjxN3HNkBoB6HREMc5QE1qobMPZb+ZmYbRzHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by PH7PR11MB6769.namprd11.prod.outlook.com (2603:10b6:510:1af::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Mon, 28 Nov 2022 09:34:11 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::c945:6fc3:ca84:dd9b]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::c945:6fc3:ca84:dd9b%9]) with mapi id 15.20.5857.023; Mon, 28 Nov 2022 09:34:11 +0000 From: "duntan" 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 Thread-Topic: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest Thread-Index: AQHY/mhQafQCh/tB5USXUEAXEUkBHq5UG2DA Date: Mon, 28 Nov 2022 09:34:11 +0000 Message-ID: References: <20221122114737.393-1-dun.tan@intel.com> <1729E5B1AD6A86B6.31464@groups.io> In-Reply-To: <1729E5B1AD6A86B6.31464@groups.io> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5483:EE_|PH7PR11MB6769:EE_ x-ms-office365-filtering-correlation-id: 08935a4a-4622-47f3-b34d-08dad123b4e9 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rh0Y8D2AOVdzvyiKGZdlzruUm3SmdC4qygrQlIoLsHUufVDYh65qwZ+z5mph0Gw4EXqdhJtK3SCXMS+kYiLGYaLQno3AAK8MY41XFiFh5YouD8YH/Bro1Wlfl0YpF/hzsly+As/SOslK8iK79j2TIxaTEKoFsVZREGC7mx9xFjoGi2iJxf9KgcvekEtYYrA2taVwsjbhpK2NpcbtBF0gyUCbjrEb5pgE0p2i1OOjZ9Cr9hT7PglXp7DXLfpe2WzVog/nK1qmYbUCYm2TxEFDBzthIWpkSAmEE9yABYrh31sdeKPIRmtrdZ6bcQB+zggo+m6KALukufoQBv+nqltdgTUeFWF8rboTOGfWe7R9awvrbg18J4PFrYKyjE822+xuUHkDQAniLjh3c3gEOpsrYeGlSYmRPOzCqUV7h4YrMV777z7ckkozEkqPBzrMhRdLUYOlCntZrj2nk/I1K0ESfwX85HsPakHZ8r3ik2HQlJN/qNEBP1dTqInAqEPZL3lkTKMp9L5mbHcs6WEeOfElddfqHRHSVvca698GNsZnbPNg0YOPIAGhVAmANYUyCvc5Z8bGCSjQOUw7qbU/Aq3EQqJjkfuA9xk4otq7azdLSbVbqleziHOULB7NB9AMfyh9BFOFWQKgyGLzxKhOuvpOrNnDcHuBLMplNKE/qGbJGpY5k42Hpvu9WeAd5ObXp5RakLG4yEo1GC4sRWzxYT6QNP44bacg97M98qLyW5tesbyqfbEzMOQOhWIE3bNlN/LkVab94Sxk15O5fiA0Q6cuug== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5483.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(366004)(136003)(396003)(346002)(39860400002)(451199015)(66899015)(316002)(2906002)(8936002)(186003)(83380400001)(52536014)(33656002)(5660300002)(86362001)(41300700001)(66446008)(38100700002)(66476007)(82960400001)(76116006)(66556008)(66946007)(38070700005)(55016003)(122000001)(54906003)(110136005)(64756008)(53546011)(966005)(478600001)(7696005)(6506007)(107886003)(4326008)(26005)(9686003)(8676002)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?esbOiYVFFcyMMyWMrZU1NJLVyfqa90eg9VDl9On4PNRpePUjJHtj4fcGltCn?= =?us-ascii?Q?uu2F6wwQ00fJ1DrxZCYIB6rcNvvcqwRi7Eehllh4tUsJZ/AoXjiBkvCJEZ7J?= =?us-ascii?Q?WSzbkuGHG1o5FgpKq3YCBwSMa5q0EFCPEdeS3+qTmBsjmFWBPBKWmFctzDVR?= =?us-ascii?Q?jdPkXjxEl/yig8LaelIiyiO/jppf2Fpo/0voNFfzCmCsEcCyKDIL1vQd14WN?= =?us-ascii?Q?zsDwEFgNk7LCYpZKLu2em9xRCLg/74Sh4zxpO1dUMsBvrZmrAEKDUqK/Yrcg?= =?us-ascii?Q?/NqlJQUMi5+EpteAQjejrtUwZM8fBmhe7sv7sBmD6LmSvhLBe4Z0ADZ7F289?= =?us-ascii?Q?Jr87VqpMXie3dLb3mCIjV0/CN84cFRlPD/++yXnHglybpyzVJFCTu6LckcaK?= =?us-ascii?Q?UFg4Ryyts9As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Q?v95aE4TSDCHpJtbgyaeXh7hvhrxOyMgqxAyc02/BxsSakdPQfArkH7EvrfJJ?= =?us-ascii?Q?gmTFHeoi0qytnDJ1Sk3AkAQEjnTwkvx/2JHWEhKWFNWkPdtiZfnHTT8MXLs3?= =?us-ascii?Q?nriBDwZ/wg/fPcBUUhs81OqrxXKjj99lWHogq1OU5Xew7CCyw1Wkg7GiFXRb?= =?us-ascii?Q?DSqtR8znLtLMpTmB1InIMU4muJemaTPYbJ+xDQfcqvtYUew+nyPbb0VXky+8?= =?us-ascii?Q?qrdPsnJLOvViW4ao5ykIZ8lhhVitUv0pjCVjJ/GU?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08935a4a-4622-47f3-b34d-08dad123b4e9 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2022 09:34:11.5465 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Kh3MNm1EOj6HnuZ1VdtI1fq3uP/6nTP7R00sWcfoTPaAvgty48wGY/DKFZgnQNIYEnGgFk1mxLOIW2lS6X5GFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6769 Return-Path: dun.tan@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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, Limi= ng ; Ni, Ray Subject: [edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI templa= te for Shell UnitTest Expand PlatformCI build and run steps template for Shell UnitTest. Add a ne= w parameter unit_test_list to support building and running specific Shell U= nitTest 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_t= est_list}} -p $(pkgs_to_build)' will be added into the arguments to build s= pecific UnitTest modules in pkgs_to_build. In 'Run to shell' step, if unit_test_list is not null, all the UnitTest mod= ules 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 ${{=20 + parameters.build_target}} -a ${{ parameters.build_arch}} --pr-target=20 + origin/$(System.PullRequest.targetBranch) --output-count-format-string=20 + "##vso[task.setvariable variable=3Dpkg_count;isOutpout=3Dtrue]{pkgcount}"= =20 + --output-csv-format-string "##vso[task.setvariable=20 + 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()),=20 + 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=20 +${{ parameters.build_file }} TOOL_CHAIN_TAG=3D${{=20 +parameters.tool_chain_tag}} TARGET=3D${{ parameters.build_target}} -a ${{= =20 +parameters.build_arch}} ${{ parameters.build_flags}} + condition: and(and(gt(variables.pkg_count, 0), succeeded()),=20 +not(eq(variables.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${{=20 + parameters.tool_chain_tag}} TARGET=3D${{ parameters.build_target}} -a=20 + ${{ parameters.build_arch}} ${{ parameters.build_flags}} ${{=20 + 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 -- 2.31.1.windows.1