Fix not being able to find CodeQL.

This commit is contained in:
Chris Gavin
2020-09-15 13:54:28 +01:00
parent 81942c8299
commit 9337c6edb4
2 changed files with 3 additions and 2 deletions

View File

@@ -19,5 +19,4 @@ $UnGzipedCodeQLBundlePath = Join-Path $DownloadDirectoryPath "codeql-bundle.tar"
Extract-7Zip -Path $UnGzipedCodeQLBundlePath -DestinationPath $ExtractionDirectory
# Test that the tool has been extracted successfully.
$Env:CODEQL_EXTRACTION_DIRECTORY = $ExtractionDirectory
Invoke-PesterTests -TestFile "Tools" -TestName "CodeQLBundle"

View File

@@ -43,7 +43,9 @@ Describe "CMake" {
Describe "CodeQLBundle" {
It "CodeQLBundle" {
$CodeQLPath = Join-Path $Env:CODEQL_EXTRACTION_DIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
$CodeQLVersionPath = (Get-Item $CodeQLVersionsWildcard).FullPath
$CodeQLPath = Join-Path CodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql.exe"
"$CodeQLPath version" | Should -ReturnZeroExitCode
}
}