mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
Add VS build tools installation for Windows (#1533)
* 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>
This commit is contained in:
@@ -5,17 +5,27 @@ Describe "Visual Studio" {
|
||||
}
|
||||
|
||||
It "Devenv.exe" {
|
||||
$vsInstallRoot = Get-VisualStudioPath
|
||||
$vsInstallRoot = (Get-VisualStudioProduct -ProductType "VisualStudio").InstallationPath
|
||||
$devenvexePath = "${vsInstallRoot}\Common7\IDE\devenv.exe"
|
||||
$devenvexePath | Should -Exist
|
||||
}
|
||||
}
|
||||
|
||||
Context "Visual Studio components" {
|
||||
$expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty workloads
|
||||
$testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} }
|
||||
$testCases = (Get-ToolsetContent).visualStudio.workloads | ForEach-Object { @{ComponentName = $_} }
|
||||
BeforeAll {
|
||||
$installedComponents = Get-VisualStudioComponents | Select-Object -ExpandProperty Package
|
||||
$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 {
|
||||
|
||||
Reference in New Issue
Block a user