mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
* add VS build tools installation, tests, reports, made minor changes to current VS install helper functions * Vstype typo * removed unused variable * validate set for new functions * some variable names clarifications * test parameter error * style and syntax improvments * syntax notation Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
35 lines
1.3 KiB
PowerShell
35 lines
1.3 KiB
PowerShell
Describe "Visual Studio" {
|
|
Context "Basic" {
|
|
It "Catalog.json" {
|
|
Get-VsCatalogJsonPath | Should -Exist
|
|
}
|
|
|
|
It "Devenv.exe" {
|
|
$vsInstallRoot = (Get-VisualStudioProduct -ProductType "VisualStudio").InstallationPath
|
|
$devenvexePath = "${vsInstallRoot}\Common7\IDE\devenv.exe"
|
|
$devenvexePath | Should -Exist
|
|
}
|
|
}
|
|
|
|
Context "Visual Studio components" {
|
|
$testCases = (Get-ToolsetContent).visualStudio.workloads | ForEach-Object { @{ComponentName = $_} }
|
|
BeforeAll {
|
|
$installedComponents = Get-VisualStudioComponents -ProductType "VisualStudio" | Select-Object -ExpandProperty Package
|
|
}
|
|
|
|
It "<ComponentName>" -TestCases $testCases {
|
|
$installedComponents | Should -Contain $ComponentName
|
|
}
|
|
}
|
|
|
|
Context "Visual Studio Build Tools components" {
|
|
$testCases = (Get-ToolsetContent).visualStudio.buildtools_workloads | ForEach-Object { @{ComponentName = $_} }
|
|
BeforeAll {
|
|
$installedComponents = Get-VisualStudioComponents -ProductType "BuildTools" | Select-Object -ExpandProperty Package
|
|
}
|
|
|
|
It "<ComponentName>" -TestCases $testCases {
|
|
$installedComponents | Should -Contain $ComponentName
|
|
}
|
|
}
|
|
} |