From d2c84c9d4c30a469ab32e88d9118914a9380a53f Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:31:28 +0200 Subject: [PATCH] [Ubuntu] install gcc@11 from brew (#6202) --- images/linux/scripts/tests/Tools.Tests.ps1 | 16 +++++++++++----- images/linux/toolsets/toolset-1804.json | 9 ++++++++- images/linux/toolsets/toolset-2004.json | 9 ++++++++- images/linux/toolsets/toolset-2204.json | 5 ++++- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/images/linux/scripts/tests/Tools.Tests.ps1 b/images/linux/scripts/tests/Tools.Tests.ps1 index 97a364b14..5d7c5a854 100644 --- a/images/linux/scripts/tests/Tools.Tests.ps1 +++ b/images/linux/scripts/tests/Tools.Tests.ps1 @@ -257,16 +257,22 @@ Describe "HHVM" -Skip:(Test-IsUbuntu22) { } Describe "Homebrew" { + $brewToolset = (Get-ToolsetContent).brew + $testCases = $brewToolset | ForEach-Object { @{brewName = $_.name; brewCommand = $_.command} } + It "homebrew" { "brew --version" | Should -ReturnZeroExitCode } - Context "Packages" { - $testCases = (Get-ToolsetContent).brew | ForEach-Object { @{ ToolName = $_.name } } + It "zstd has /usr/local/bin symlink" { + "/usr/local/bin/zstd" | Should -Exist + } - It "" -TestCases $testCases { - "$ToolName --version" | Should -Not -BeNullOrEmpty - } + It "homebrew package " -TestCases $testCases { + $brewPrefix = brew --prefix $brewName + $brewPackage = Join-Path $brewPrefix "bin" $brewCommand + + "$brewPackage --version" | Should -ReturnZeroExitCode } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index 264c6d96a..b4a42783b 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -217,7 +217,14 @@ ] }, "brew": [ - {"name": "zstd"} + { + "name": "gcc@11", + "command": "gcc-11" + }, + { + "name": "zstd", + "command": "zstd" + } ], "docker": { "images": [ diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index df9434cda..01ae9d0f6 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -217,7 +217,14 @@ ] }, "brew": [ - {"name": "zstd"} + { + "name": "gcc@11", + "command": "gcc-11" + }, + { + "name": "zstd", + "command": "zstd" + } ], "docker": { "images": [ diff --git a/images/linux/toolsets/toolset-2204.json b/images/linux/toolsets/toolset-2204.json index 3c3c4bb05..f16f0ec67 100644 --- a/images/linux/toolsets/toolset-2204.json +++ b/images/linux/toolsets/toolset-2204.json @@ -201,7 +201,10 @@ ] }, "brew": [ - {"name": "zstd"} + { + "name": "zstd", + "command": "zstd" + } ], "docker": { "images": [