From f2efcedd1dcdf1afcc1e047719db38c24242def9 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:52:01 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 3753 (#3857) * Bump MacOs version to macos-11 * Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 Co-authored-by: Wes Haggard * Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 Co-authored-by: Wes Haggard Co-authored-by: sima-zhu Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Wes Haggard --- eng/common/scripts/job-matrix/README.md | 6 +++--- .../scripts/job-matrix/samples/matrix.json | 2 +- .../tests/job-matrix-functions.filter.tests.ps1 | 2 +- .../tests/job-matrix-functions.tests.ps1 | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eng/common/scripts/job-matrix/README.md b/eng/common/scripts/job-matrix/README.md index b9f540e42..51c57506f 100644 --- a/eng/common/scripts/job-matrix/README.md +++ b/eng/common/scripts/job-matrix/README.md @@ -102,7 +102,7 @@ Example: "operatingSystem": [ "windows-2019", "ubuntu-18.04", - "macOS-10.15" + "macos-11" ], "framework": [ "net461", @@ -380,7 +380,7 @@ In the matrix job output that azure pipelines consumes, the format is a dictiona { "net461_macOS1015": { "framework": "net461", - "operatingSystem": "macOS-10.15" + "operatingSystem": "macos-11" }, "net50_ubuntu1804": { "framework": "net50", @@ -512,7 +512,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete "Agent": { "windows-2019": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2019-general" }, "ubuntu-1804": { "OSVmImage": "MMSUbuntu18.04", "Pool": "azsdk-pool-mms-ubuntu-1804-general" }, - "macOS-10.15": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" } + "macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } }, "JavaTestVersion": [ "1.8", "1.11" ], "AZURE_TEST_HTTP_CLIENTS": "netty", diff --git a/eng/common/scripts/job-matrix/samples/matrix.json b/eng/common/scripts/job-matrix/samples/matrix.json index a9e291604..98e1dd757 100644 --- a/eng/common/scripts/job-matrix/samples/matrix.json +++ b/eng/common/scripts/job-matrix/samples/matrix.json @@ -6,7 +6,7 @@ "Agent": { "ubuntu": { "OSVmImage": "ubuntu-18.04", "Pool": "Azure Pipelines" }, "windows": { "OSVmImage": "windows-2019", "Pool": "Azure Pipelines" }, - "macOS": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" } + "macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } }, "TestTargetFramework": [ "netcoreapp2.1", "net461", "net5.0" ] }, diff --git a/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 b/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 index a25367beb..7c327eb27 100644 --- a/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 +++ b/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { $matrixConfig = @" { "matrix": { - "operatingSystem": [ "windows-2019", "ubuntu-18.04", "macOS-10.15" ], + "operatingSystem": [ "windows-2019", "ubuntu-18.04", "macos-11" ], "framework": [ "net461", "netcoreapp2.1" ], "additionalArguments": [ "", "mode=test" ] } diff --git a/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 b/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 index 38b7e4442..689ed9108 100644 --- a/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 +++ b/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 @@ -12,7 +12,7 @@ BeforeAll { "operatingSystem": [ "windows-2019", "ubuntu-18.04", - "macOS-10.15" + "macos-11" ], "framework": [ "net461", @@ -36,11 +36,11 @@ BeforeAll { "framework": "net461" }, { - "operatingSystem": "macOS-10.15", + "operatingSystem": "macos-11", "framework": "netcoreapp2.1" }, { - "operatingSystem": ["macOS-10.15", "ubuntu-18.04"], + "operatingSystem": ["macos-11", "ubuntu-18.04"], "additionalArguments": "--enableFoo" } ] @@ -275,7 +275,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { "operatingSystem": [ "windows-2019", "ubuntu-18.04", - "macOS-10.15" + "macos-11" ], "framework": [ "net461", @@ -340,7 +340,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { $element.parameters.additionalArguments | Should -Be "--enableFoo" $element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions - $element.parameters.operatingSystem | Should -Be "macOS-10.15" + $element.parameters.operatingSystem | Should -Be "macos-11" $element.parameters.framework | Should -Be "netcoreapp2.1" $element.parameters.additionalArguments | Should -Be "--enableFoo" } @@ -348,7 +348,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { It "Should initialize a sparse matrix from an N-dimensional matrix" -TestCases @( @{ i = 0; name = "windows2019_net461"; operatingSystem = "windows-2019"; framework = "net461"; additionalArguments = ""; } @{ i = 1; name = "ubuntu1804_netcoreapp21_withfoo"; operatingSystem = "ubuntu-18.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; } - @{ i = 2; name = "macOS1015_net461"; operatingSystem = "macOS-10.15"; framework = "net461"; additionalArguments = ""; } + @{ i = 2; name = "macOS11_net461"; operatingSystem = "macos-11"; framework = "net461"; additionalArguments = ""; } ) { $sparseMatrix = GenerateSparseMatrix $generateConfig.matrixParameters $generateConfig.displayNamesLookup $dimensions = GetMatrixDimensions $generateConfig.matrixParameters @@ -440,9 +440,9 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { $matrix[2].parameters.operatingSystem | Should -Be "ubuntu-18.04" $matrix[2].parameters.additionalArguments | Should -Be "" - $matrix[4].name | Should -Be "macOS1015_net461" + $matrix[4].name | Should -Be "macOS11_net461" $matrix[4].parameters.framework | Should -Be "net461" - $matrix[4].parameters.operatingSystem | Should -Be "macOS-10.15" + $matrix[4].parameters.operatingSystem | Should -Be "macos-11" $matrix[4].parameters.additionalArguments | Should -Be "" $matrix[7].name | Should -Be "windows2019_net50_enableWindowsFoo"