From 06dd4c14e4aa8c14febdd8d6cf123b8d770b4e4a Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Wed, 24 Aug 2022 17:17:18 +0200 Subject: [PATCH] [macOS] Don't show CodeQl in Catalina's sw report (#6139) --- .../macos/software-report/SoftwareReport.Generator.ps1 | 9 +++++++-- images/macos/tests/Common.Tests.ps1 | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index c83645f50..d3e43733c 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -159,10 +159,15 @@ $toolsList = @( (Get-AzureDevopsVersion), (Get-AWSCLIVersion), (Get-AWSSAMCLIVersion), - (Get-AWSSessionManagerCLIVersion), - (Get-CodeQLBundleVersion) + (Get-AWSSessionManagerCLIVersion) ) +if (-not $os.IsCatalina) { + $toolsList += @( + (Get-CodeQLBundleVersion) + ) +} + if ($os.IsLessThanMonterey) { $toolsList += @( (Get-AliyunCLIVersion) diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 index aa5a9db45..9ae2eaa9c 100644 --- a/images/macos/tests/Common.Tests.ps1 +++ b/images/macos/tests/Common.Tests.ps1 @@ -139,13 +139,13 @@ Describe "VirtualBox" -Skip:($os.IsBigSur) { } } -Describe "CodeQL" { +Describe "CodeQL" -Skip:($os.IsCatalina) { It "codeql" { $CodeQLVersionWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*" $CodeQLVersionPath = Get-ChildItem $CodeQLVersionWildcard | Select-Object -First 1 -Expand FullName $CodeQLPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql" "$CodeQLPath version --quiet" | Should -ReturnZeroExitCode - + $CodeQLPacksPath = Join-Path $CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "qlpacks" $CodeQLPacksPath | Should -Exist }