diff --git a/images/win/scripts/Installers/Install-CodeQLBundle.ps1 b/images/win/scripts/Installers/Install-CodeQLBundle.ps1 index 7878d6c65..d5ecf1b5a 100644 --- a/images/win/scripts/Installers/Install-CodeQLBundle.ps1 +++ b/images/win/scripts/Installers/Install-CodeQLBundle.ps1 @@ -19,4 +19,5 @@ $UnGzipedCodeQLBundlePath = Join-Path $DownloadDirectoryPath "codeql-bundle.tar" Extract-7Zip -Path $UnGzipedCodeQLBundlePath -DestinationPath $ExtractionDirectory # Test that the tool has been extracted successfully. -& (Join-Path $ExtractionDirectory "codeql" "codeql.exe") version +$Env:CODEQL_EXTRACTION_DIRECTORY = $ExtractionDirectory +Invoke-PesterTests -TestFile "Tools" -TestName "CodeQLBundle" diff --git a/images/win/scripts/Tests/Tools.Tests.ps1 b/images/win/scripts/Tests/Tools.Tests.ps1 index 88f2ca88f..c2b52baf9 100644 --- a/images/win/scripts/Tests/Tools.Tests.ps1 +++ b/images/win/scripts/Tests/Tools.Tests.ps1 @@ -41,6 +41,13 @@ Describe "CMake" { } } +Describe "CodeQLBundle" { + It "CodeQLBundle" { + $CodeQLPath = Join-Path $Env:CODEQL_EXTRACTION_DIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe" + "$CodeQLPath version" | Should -ReturnZeroExitCode + } +} + Describe "R" { It "Rscript" { "Rscript --version" | Should -ReturnZeroExitCode