[Windows] Move choco installation list into toolset (#3688)

* Move choco installation list into toolset

* Add a condition to Install-CommonUtils.ps1

* Rename tests and revert Bazel to single script

* Return Install-Bazel.ps1 to windows2016.json and windows2019.json

* Remove condition and Write-Host command from Install-CommonUtils.ps1

* Reset Install-Bazel.ps1 to be the same as in main

* Update choco.common_packages in toolset-2016.json and toolset-2019.json

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
Nikita Bykov
2021-07-08 06:23:07 -07:00
committed by GitHub
parent e8381d7db3
commit 8a77fdb2a1
24 changed files with 163 additions and 262 deletions

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-7zip.ps1
## Desc: Install 7zip
################################################################################
Choco-Install -PackageName 7zip.install
Invoke-PesterTests -TestFile "Tools" -TestName "7-Zip"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-AzCopy.ps1
## Desc: Install AzCopy10
################################################################################
Choco-Install -PackageName azcopy10
Invoke-PesterTests -TestFile "Tools" -TestName "AzCopy"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Bicep.ps1
## Desc: Install Bicep
################################################################################
Choco-Install -PackageName Bicep
Invoke-PesterTests -TestFile "Tools" -TestName "Bicep"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Cmake.ps1
## Desc: Install Cmake
################################################################################
Choco-Install -PackageName cmake.install -ArgumentList "--installargs",'ADD_CMAKE_TO_PATH=""System""'
Invoke-PesterTests -TestFile "Tools" -TestName "CMake"

View File

@@ -0,0 +1,8 @@
$commonPackages = (Get-ToolsetContent).choco.common_packages
foreach ($package in $commonPackages)
{
Choco-Install -PackageName $package.name -ArgumentList $package.args
}
Invoke-PesterTests -TestFile "ChocoPackages"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-GitVersion.ps1
## Desc: Install GitVersion
################################################################################
Choco-Install -PackageName gitversion.portable
Invoke-PesterTests -TestFile "Git" -TestName "GitVersion"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-InnoSetup.ps1
## Desc: Install Inno Setup
################################################################################
Choco-Install -PackageName innosetup
Invoke-PesterTests -TestFile "Tools" -TestName "InnoSetup"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Jq.ps1
## Desc: Install jq
################################################################################
Choco-Install -PackageName jq
Invoke-PesterTests -TestFile "Tools" -TestName "Jq"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Julia.ps1
## Desc: Install Julia
################################################################################
Choco-Install -PackageName julia -ArgumentList "--ia","/DIR=C:\Julia"
Invoke-PesterTests -TestFile "Tools" -TestName "Julia"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Nuget.ps1
## Desc: Install NuGet.CommandLine
################################################################################
Choco-Install -PackageName NuGet.CommandLine
Invoke-PesterTests -TestFile "Tools" -TestName "Nuget"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-OpenSSL.ps1
## Desc: Install OpenSSL
################################################################################
Choco-Install -PackageName openssl.light
Invoke-PesterTests -TestFile "Tools" -TestName "OpenSSL"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Packer.ps1
## Desc: Install Packer
################################################################################
Choco-Install -PackageName packer
Invoke-PesterTests -TestFile "Tools" -TestName "Packer"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Perl.ps1
## Desc: Install Perl
################################################################################
Choco-Install -PackageName strawberryperl
Invoke-PesterTests -TestFile "Tools" -TestName "Perl"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Pulumi.ps1
## Desc: Install Pulumi
################################################################################
Choco-Install -PackageName pulumi
Invoke-PesterTests -TestFile "Tools" -TestName "Pulumi"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Svn.ps1
## Desc: Install Subversion
################################################################################
Choco-Install -PackageName tortoisesvn
Invoke-PesterTests -TestFile "Tools" -TestName "Svn"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-Swig.ps1
## Desc: Install Swig
################################################################################
Choco-Install -PackageName swig
Invoke-PesterTests -TestFile "Tools" -TestName "Swig"

View File

@@ -1,8 +0,0 @@
################################################################################
## File: Install-VSWhere.ps1
## Desc: Install latest stable version of VSWhere
################################################################################
Choco-Install -PackageName vswhere
Invoke-PesterTests -TestFile "Tools" -TestName "VSWhere"

View File

@@ -0,0 +1,99 @@
Describe "7-Zip" {
It "7z" {
"7z" | Should -ReturnZeroExitCode
}
}
Describe "AzCopy" {
It "AzCopy" {
"azcopy --version" | Should -ReturnZeroExitCode
}
}
Describe "Bicep" {
It "Bicep" {
"bicep --version" | Should -ReturnZeroExitCode
}
}
Describe "GitVersion" {
It "gitversion is installed" {
"gitversion /version" | Should -ReturnZeroExitCode
}
}
Describe "InnoSetup" {
It "InnoSetup" {
(Get-Command -Name iscc).CommandType | Should -BeExactly "Application"
}
}
Describe "Jq" {
It "Jq" {
"jq -n ." | Should -ReturnZeroExitCode
}
}
Describe "Nuget" {
It "Nuget" {
"nuget" | Should -ReturnZeroExitCode
}
}
Describe "OpenSSL" {
It "OpenSSL" {
"openssl version" | Should -ReturnZeroExitCode
}
}
Describe "Packer" {
It "Packer" {
"packer --version" | Should -ReturnZeroExitCode
}
}
Describe "Perl" {
It "Perl" {
"perl --version" | Should -ReturnZeroExitCode
}
}
Describe "Pulumi" {
It "pulumi" {
"pulumi version" | Should -ReturnZeroExitCode
}
}
Describe "Svn" {
It "svn" {
"svn --version --quiet" | Should -ReturnZeroExitCode
}
}
Describe "Swig" {
It "Swig" {
"swig -version" | Should -ReturnZeroExitCode
}
}
Describe "VSWhere" {
It "vswhere" {
"vswhere" | Should -ReturnZeroExitCode
}
}
Describe "Julia" {
It "Julia path exists" {
"C:\Julia" | Should -Exist
}
It "Julia" {
"julia --version" | Should -ReturnZeroExitCode
}
}
Describe "CMake" {
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
}
}

View File

@@ -23,9 +23,3 @@ Describe "Git" {
$env:GCM_INTERACTIVE | Should -BeExactly Never
}
}
Describe "GitVersion" {
It "gitversion is installed" {
"gitversion /version" | Should -ReturnZeroExitCode
}
}

View File

@@ -1,17 +1,5 @@
Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Common.psm1") -DisableNameChecking
Describe "7-Zip" {
It "7z" {
"7z" | Should -ReturnZeroExitCode
}
}
Describe "AzCopy" {
It "AzCopy" {
"azcopy --version" | Should -ReturnZeroExitCode
}
}
Describe "Azure Cosmos DB Emulator" {
$cosmosDbEmulatorRegKey = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Get-ItemProperty | Where-Object { $_.DisplayName -eq 'Azure Cosmos DB Emulator' }
$installDir = $cosmosDbEmulatorRegKey.InstallLocation
@@ -35,18 +23,6 @@ Describe "Bazel" {
}
}
Describe "Bicep" {
It "Bicep" {
"bicep --version" | Should -ReturnZeroExitCode
}
}
Describe "CMake" {
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
}
}
Describe "CodeQLBundle" {
It "CodeQLBundle" {
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "codeql" | Join-Path -ChildPath "*"
@@ -78,22 +54,6 @@ Describe "DotnetTLS" {
}
}
Describe "Jq" {
It "Jq" {
"jq -n ." | Should -ReturnZeroExitCode
}
}
Describe "Julia" {
It "Julia path exists" {
"C:\Julia" | Should -Exist
}
It "Julia" {
"julia --version" | Should -ReturnZeroExitCode
}
}
Describe "Mercurial" {
It "Mercurial" {
"hg --version" | Should -ReturnZeroExitCode
@@ -128,12 +88,6 @@ Describe "Mingw64" {
}
}
Describe "InnoSetup" {
It "InnoSetup" {
(Get-Command -Name iscc).CommandType | Should -BeExactly "Application"
}
}
Describe "GoogleCloudSDK" {
It "<ToolName>" -TestCases @(
@{ ToolName = "bq" }
@@ -157,30 +111,6 @@ Describe "NSIS" {
}
}
Describe "Nuget" {
It "Nuget" {
"nuget" | Should -ReturnZeroExitCode
}
}
Describe "OpenSSL" {
It "OpenSSL" {
"openssl version" | Should -ReturnZeroExitCode
}
}
Describe "Packer" {
It "Packer" {
"packer --version" | Should -ReturnZeroExitCode
}
}
Describe "Perl" {
It "Perl" {
"perl --version" | Should -ReturnZeroExitCode
}
}
Describe "PowerShell Core" {
It "pwsh" {
"pwsh --version" | Should -ReturnZeroExitCode
@@ -191,12 +121,6 @@ Describe "PowerShell Core" {
}
}
Describe "Pulumi" {
It "pulumi" {
"pulumi version" | Should -ReturnZeroExitCode
}
}
Describe "Sbt" {
It "sbt" {
"sbt --version" | Should -ReturnZeroExitCode
@@ -209,12 +133,6 @@ Describe "ServiceFabricSDK" {
}
}
Describe "Svn" {
It "svn" {
"svn --version --quiet" | Should -ReturnZeroExitCode
}
}
Describe "Stack" {
It "Stack" {
"stack --version" | Should -ReturnZeroExitCode
@@ -241,12 +159,6 @@ Describe "Vcpkg" {
}
}
Describe "VSWhere" {
It "vswhere" {
"vswhere" | Should -ReturnZeroExitCode
}
}
Describe "WebPlatformInstaller" {
It "WebPlatformInstaller" {
"WebPICMD" | Should -ReturnZeroExitCode
@@ -264,9 +176,3 @@ Describe "Pipx" {
"pipx --version" | Should -ReturnZeroExitCode
}
}
Describe "Swig" {
It "Swig" {
"swig -version" | Should -ReturnZeroExitCode
}
}