2020-09-10 14:34:08 +03:00
|
|
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
2021-01-14 12:17:44 +03:00
|
|
|
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking
|
2020-09-10 14:34:08 +03:00
|
|
|
|
|
|
|
|
$os = Get-OSVersion
|
|
|
|
|
|
2020-12-23 22:14:13 +07:00
|
|
|
Describe ".NET" {
|
|
|
|
|
It ".NET" {
|
|
|
|
|
"dotnet --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-08 00:35:25 +03:00
|
|
|
Describe "GCC" {
|
2021-05-13 11:45:33 +03:00
|
|
|
$testCases = Get-ToolsetValue -KeyPath gcc.versions | ForEach-Object { @{Version = $_} }
|
2020-09-10 14:34:08 +03:00
|
|
|
|
2020-12-23 22:14:13 +07:00
|
|
|
It "GCC <Version>" -TestCases $testCases {
|
2020-09-10 14:34:08 +03:00
|
|
|
param (
|
2020-12-23 22:14:13 +07:00
|
|
|
[string] $Version
|
2020-09-10 14:34:08 +03:00
|
|
|
)
|
2020-09-21 10:53:56 +03:00
|
|
|
|
2020-12-23 22:14:13 +07:00
|
|
|
"gcc-$Version --version" | Should -ReturnZeroExitCode
|
2020-09-10 14:34:08 +03:00
|
|
|
}
|
|
|
|
|
|
2020-12-23 22:14:13 +07:00
|
|
|
It "Gfortran <Version>" -TestCases $testCases {
|
2020-09-10 14:34:08 +03:00
|
|
|
param (
|
2020-12-23 22:14:13 +07:00
|
|
|
[string] $Version
|
2020-09-10 14:34:08 +03:00
|
|
|
)
|
|
|
|
|
|
2020-12-23 22:14:13 +07:00
|
|
|
"gfortran-$Version --version" | Should -ReturnZeroExitCode
|
2020-09-10 14:34:08 +03:00
|
|
|
}
|
2020-12-03 18:40:19 +03:00
|
|
|
|
|
|
|
|
It "Gfortran is not found in the default path" {
|
|
|
|
|
"$(which gfortran)" | Should -BeNullOrEmpty
|
|
|
|
|
}
|
2020-09-10 14:34:08 +03:00
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "vcpkg" -Skip:($os.IsVenturaArm64) {
|
2020-09-10 14:34:08 +03:00
|
|
|
It "vcpkg" {
|
|
|
|
|
"vcpkg version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "AWS" -Skip:($os.IsVenturaArm64) {
|
2021-01-11 13:30:51 +07:00
|
|
|
It "AWS CLI" {
|
|
|
|
|
"aws --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
It "AWS SAM CLI" {
|
|
|
|
|
"sam --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "AWS Session Manager CLI" {
|
|
|
|
|
"session-manager-plugin --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Describe "AzCopy" {
|
|
|
|
|
It "AzCopy" {
|
|
|
|
|
"azcopy --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "Miniconda" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
|
2021-01-11 13:30:51 +07:00
|
|
|
It "Conda" {
|
|
|
|
|
Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty
|
|
|
|
|
$condaBinPath = Join-Path $env:CONDA "bin" "conda"
|
|
|
|
|
"$condaBinPath --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "Stack" -Skip:($os.IsVenturaArm64) {
|
2021-01-11 13:30:51 +07:00
|
|
|
It "Stack" {
|
|
|
|
|
"stack --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-14 00:46:44 +07:00
|
|
|
Describe "CocoaPods" {
|
|
|
|
|
It "CocoaPods" {
|
|
|
|
|
"pod --version" | Should -ReturnZeroExitCode
|
2021-01-11 13:30:51 +07:00
|
|
|
}
|
2021-01-20 14:11:00 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Describe "VSMac" {
|
2022-05-26 17:05:57 +02:00
|
|
|
$vsMacVersions = Get-ToolsetValue "xamarin.vsmac.versions"
|
|
|
|
|
$defaultVSMacVersion = Get-ToolsetValue "xamarin.vsmac.default"
|
|
|
|
|
|
|
|
|
|
$testCases = $vsMacVersions | ForEach-Object {
|
|
|
|
|
$vsPath = "/Applications/Visual Studio $_.app"
|
|
|
|
|
if ($_ -eq $defaultVSMacVersion) {
|
|
|
|
|
$vsPath = "/Applications/Visual Studio.app"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@{ vsversion = $_ ; vspath = $vsPath }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Visual Studio <vsversion> for Mac is installed" -TestCases $testCases {
|
2021-01-20 14:11:00 +07:00
|
|
|
$vstoolPath = Join-Path $vsPath "Contents/MacOS/vstool"
|
|
|
|
|
$vsPath | Should -Exist
|
|
|
|
|
$vstoolPath | Should -Exist
|
|
|
|
|
}
|
2022-05-18 16:49:37 +02:00
|
|
|
|
2022-05-26 17:05:57 +02:00
|
|
|
It "Visual Studio $defaultVSMacVersion for Mac is default" {
|
|
|
|
|
$vsPath = "/Applications/Visual Studio.app"
|
2022-05-18 16:49:37 +02:00
|
|
|
$vstoolPath = Join-Path $vsPath "Contents/MacOS/vstool"
|
|
|
|
|
$vsPath | Should -Exist
|
|
|
|
|
$vstoolPath | Should -Exist
|
|
|
|
|
}
|
2021-06-07 16:00:50 +03:00
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "Swig" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
|
2021-06-07 16:00:50 +03:00
|
|
|
It "Swig" {
|
|
|
|
|
"swig -version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-07 09:10:31 -05:00
|
|
|
|
|
|
|
|
Describe "Bicep" {
|
|
|
|
|
It "Bicep" {
|
|
|
|
|
"bicep --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
2021-09-10 14:41:17 +03:00
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "Go" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
|
2021-09-10 14:41:17 +03:00
|
|
|
It "Go" {
|
|
|
|
|
"go version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
2022-02-02 11:02:55 +03:00
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "VirtualBox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsVenturaArm64) {
|
2022-05-24 23:48:57 +04:00
|
|
|
It "Check kext kernel modules" {
|
|
|
|
|
kextstat | Out-String | Should -Match "org.virtualbox.kext"
|
|
|
|
|
}
|
2022-08-15 19:36:32 +02:00
|
|
|
}
|
|
|
|
|
|
2023-02-13 16:40:48 +01:00
|
|
|
Describe "CodeQLBundles" {
|
2023-01-29 05:46:43 -08:00
|
|
|
It "Latest CodeQL Bundle" {
|
|
|
|
|
$CodeQLVersionWildcards = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
|
|
|
|
|
$LatestCodeQLVersionPath = Get-ChildItem $CodeQLVersionWildcards | Sort-Object -Property { [SemVer]$_.name } -Descending | Select-Object -First 1 -Expand FullName
|
|
|
|
|
$LatestCodeQLPath = Join-Path $LatestCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql"
|
|
|
|
|
"$LatestCodeQLPath version --quiet" | Should -ReturnZeroExitCode
|
2022-08-24 17:17:18 +02:00
|
|
|
|
2023-01-29 05:46:43 -08:00
|
|
|
$LatestCodeQLPacksPath = Join-Path $LatestCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "qlpacks"
|
|
|
|
|
$LatestCodeQLPacksPath | Should -Exist
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Prior CodeQL Bundle" {
|
|
|
|
|
$CodeQLVersionWildcards = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
|
|
|
|
|
$PriorCodeQLVersionPath = Get-ChildItem $CodeQLVersionWildcards | Sort-Object -Property { [SemVer]$_.name } -Descending | Select-Object -Last 1 -Expand FullName
|
|
|
|
|
$PriorCodeQLPath = Join-Path $PriorCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql"
|
|
|
|
|
"$PriorCodeQLPath version --quiet" | Should -ReturnZeroExitCode
|
|
|
|
|
|
|
|
|
|
$PriorCodeQLPacksPath = Join-Path $PriorCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "qlpacks"
|
|
|
|
|
$PriorCodeQLPacksPath | Should -Exist
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Latest and Prior CodeQL Bundles are unique" {
|
|
|
|
|
$CodeQLVersionWildcards = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
|
|
|
|
|
|
|
|
|
|
$LatestCodeQLVersionPath = Get-ChildItem $CodeQLVersionWildcards | Sort-Object -Property { [SemVer]$_.name } -Descending | Select-Object -First 1 -Expand FullName
|
|
|
|
|
$LatestCodeQLPath = Join-Path $LatestCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql"
|
|
|
|
|
$LatestCodeQLVersion = & $LatestCodeQLPath version --quiet
|
|
|
|
|
|
|
|
|
|
$PriorCodeQLVersionPath = Get-ChildItem $CodeQLVersionWildcards | Sort-Object -Property { [SemVer]$_.name } -Descending | Select-Object -Last 1 -Expand FullName
|
|
|
|
|
$PriorCodeQLPath = Join-Path $PriorCodeQLVersionPath -ChildPath "x64" | Join-Path -ChildPath "codeql" | Join-Path -ChildPath "codeql"
|
|
|
|
|
$PriorCodeQLVersion = & $PriorCodeQLPath version --quiet
|
|
|
|
|
|
|
|
|
|
$LatestCodeQLVersion | Should -Not -Match $PriorCodeQLVersion
|
2022-08-15 19:36:32 +02:00
|
|
|
}
|
2022-09-27 09:54:35 +02:00
|
|
|
}
|
|
|
|
|
|
2023-05-12 13:30:13 +02:00
|
|
|
Describe "Colima" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
|
2022-09-27 09:54:35 +02:00
|
|
|
It "Colima" {
|
|
|
|
|
"colima version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|