diff --git a/images/win/scripts/Installers/Install-Pipx-Packages.ps1 b/images/win/scripts/Installers/Install-PipxPackages.ps1 similarity index 51% rename from images/win/scripts/Installers/Install-Pipx-Packages.ps1 rename to images/win/scripts/Installers/Install-PipxPackages.ps1 index a5be7b6ff..e83f5add4 100644 --- a/images/win/scripts/Installers/Install-Pipx-Packages.ps1 +++ b/images/win/scripts/Installers/Install-PipxPackages.ps1 @@ -1,12 +1,12 @@ $pipxToolset = (Get-ToolsetContent).pipx foreach($tool in $pipxToolset) { if ($tool.python) { - $pythonPath = "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}*\${env:AGENT_OSARCHITECTURE}\python-${tool.python}*" + $pythonPath = (Get-Item -Path "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}.*\x64\python-${tool.python}*").FullName Write-Host "Install ${tool.package} into python ${tool.python}" - pipx install $tool.package --python $python_path + pipx install $tool.package --python $pythonPath } else { Write-Host "Install ${tool.package} into default python" pipx install $tool.package } - Invoke-PesterTests -TestFile "PipxPackages" -TestName $tool.package -} \ No newline at end of file +} +Invoke-PesterTests -TestFile "PipxPackages" \ No newline at end of file diff --git a/images/win/scripts/Tests/PipxPackages.Test.ps1 b/images/win/scripts/Tests/PipxPackages.Test.ps1 index 3a9ad5644..fbb4c5964 100644 --- a/images/win/scripts/Tests/PipxPackages.Test.ps1 +++ b/images/win/scripts/Tests/PipxPackages.Test.ps1 @@ -1,5 +1,8 @@ -Describe "yamllint" { - It "yamllint" { - "yamllint --version" | Should -ReturnZeroExitCode +Describe "PipxPackages" { + $pipxToolset = (Get-ToolsetContent).pipx + foreach($tool in $pipxToolset) { + It "${tool.package}" { + "${tool.cmd}" | Should -ReturnZeroExitCode + } } } \ No newline at end of file diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 275e63e58..5ca23b4ed 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -292,7 +292,7 @@ "pipx": [ { "package": "yamllint", - "cmd": "yamllint" + "cmd": "yamllint --version" } ] }