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:
Leonid Lapshin
2020-09-08 10:48:31 +03:00
committed by GitHub
parent c2c26d2c17
commit 54978f0e06
12 changed files with 96 additions and 68 deletions

View File

@@ -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 {