[macOS] add pester tests to install scripts part-1. (#2286)

* [macOS] add pester tests to install scripts part-1.

* changed version

* added changes related to common utils installation

* added source tests file

* removed tests from homebrew

* moved jq to homebrew

* fix nitpicks

* incorrect things are fixed.

* fixed some mistakes in the text

* commonutils changed.

* remove swiftlint installation from toolsets

* removed useless string
This commit is contained in:
Darii Nurgaleev
2020-12-23 22:14:13 +07:00
committed by GitHub
parent ac87b63b13
commit 7403f33180
20 changed files with 310 additions and 199 deletions

View File

@@ -48,19 +48,128 @@ Describe "Audio device" -Skip:($os.IsHighSierra -or $os.IsBigSur) {
}
}
Describe "Common utilities" {
It "Homebrew" {
"brew --version" | Should -ReturnZeroExitCode
Describe "CommonUtils" {
It "Carthage" {
"carthage version" | Should -ReturnZeroExitCode
}
It "DotNet" {
"dotnet --version" | Should -ReturnZeroExitCode
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
}
It "Subversion" {
"svn --version" | Should -ReturnZeroExitCode
}
It "Go" {
"go version" | Should -ReturnZeroExitCode
}
It "GnuPG" {
"gpg --version" | Should -ReturnZeroExitCode
}
It "Clang/LLVM is installed" {
"$(brew --prefix llvm)/bin/clang --version" | Should -ReturnZeroExitCode
}
It "zstd" {
"zstd --version" | Should -ReturnZeroExitCode
}
It "Packer" {
"packer --version" | Should -ReturnZeroExitCode
}
It "Helm" {
"helm version --short" | Should -ReturnZeroExitCode
}
It "bazelisk" {
"bazelisk version" | Should -ReturnZeroExitCode
}
It "GitHub CLI" {
"gh --version" | Should -ReturnZeroExitCode
}
It "7-Zip" {
"7z i" | Should -ReturnZeroExitCode
}
It "Apache Ant" {
"ant -version" | Should -ReturnZeroExitCode
}
It "Aria2" {
"aria2c --version" | Should -ReturnZeroExitCode
}
It "GNU Tar" {
"gtar --version" | Should -ReturnZeroExitCode
}
It "bazel" {
"bazel --version" | Should -ReturnZeroExitCode
}
It "Aliyun CLI" {
"aliyun --version" | Should -ReturnZeroExitCode
}
It "Julia" {
"julia --version" | Should -ReturnZeroExitCode
}
It "virtualbox" -Skip:($os.IsBigSur) {
"vboxmanage -v" | Should -ReturnZeroExitCode
}
It "jq" {
"jq --version" | Should -ReturnZeroExitCode
}
It "curl" {
"curl --version" | Should -ReturnZeroExitCode
}
It "wget" {
"wget --version" | Should -ReturnZeroExitCode
}
It "vagrant" -Skip:($os.IsBigSur) {
"vagrant --version" | Should -ReturnZeroExitCode
}
It "xctool" -Skip:($os.IsBigSur) {
"xctool --version" | Should -ReturnZeroExitCode
}
It "R" -Skip:($os.IsBigSur) {
"R --version" | Should -ReturnZeroExitCode
}
}
Describe ".NET" {
It ".NET" {
"dotnet --version" | Should -ReturnZeroExitCode
}
}
Describe "CocoaPods" {
It "CocoaPods" {
"pod --version" | Should -ReturnZeroExitCode
}
}
Describe "Homebrew" {
It "Homebrew" {
"brew --version" | Should -ReturnZeroExitCode
}
}
Describe "Common utilities" {
It "Bundler" {
"bundler --version" | Should -ReturnZeroExitCode
}
@@ -69,14 +178,6 @@ Describe "Common utilities" {
"mvn --version" | Should -ReturnZeroExitCode
}
It "CocoaPods" {
"pod --version" | Should -ReturnZeroExitCode
}
It "Carthage" {
"carthage version" | Should -ReturnZeroExitCode
}
It "App Center CLI" {
"appcenter --version" | Should -ReturnZeroExitCode
}
@@ -98,10 +199,6 @@ Describe "Common utilities" {
}
}
It "Aliyun CLI" {
"aliyun --version" | Should -ReturnZeroExitCode
}
Context "Nomad" -Skip:($os.IsBigSur) {
It "Nomad CLI" {
$result = Get-CommandResult "gem list"
@@ -112,51 +209,30 @@ Describe "Common utilities" {
"ipa --version" | Should -ReturnZeroExitCode
}
}
It "Conda" {
Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty
$condaBinPath = Join-Path $env:CONDA "bin" "conda"
"$condaBinPath --version" | Should -ReturnZeroExitCode
Describe "Miniconda" {
It "Conda" {
Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty
$condaBinPath = Join-Path $env:CONDA "bin" "conda"
"$condaBinPath --version" | Should -ReturnZeroExitCode
}
}
It "Fastlane" {
"fastlane --version" | Should -ReturnZeroExitCode
}
It "Subversion" {
"svn --version" | Should -ReturnZeroExitCode
}
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
}
It "curl" {
"curl --version" | Should -ReturnZeroExitCode
}
It "xctool" -Skip:($os.IsBigSur) {
"xctool --version" | Should -ReturnZeroExitCode
}
It "xcpretty" {
"xcpretty --version" | Should -ReturnZeroExitCode
}
It "wget" {
"wget --version" | Should -ReturnZeroExitCode
Describe "Mongo" {
It "mongodb" {
"mongo --version" | Should -ReturnZeroExitCode
"mongod --version"| Should -ReturnZeroExitCode
}
}
It "mongodb" {
"mongo --version" | Should -ReturnZeroExitCode
"mongod --version"| Should -ReturnZeroExitCode
}
It "jq" {
"jq --version" | Should -ReturnZeroExitCode
}
Context "OpenSSL" {
Describe "OpenSSL" {
It "OpenSSL is available" {
"openssl version" | Should -ReturnZeroExitCode
}
@@ -172,10 +248,6 @@ Describe "Common utilities" {
}
}
It "GnuPG" {
"gpg --version" | Should -ReturnZeroExitCode
}
It "PostgreSQL-Client" {
"psql --version" | Should -ReturnZeroExitCode
}
@@ -184,10 +256,6 @@ Describe "Common utilities" {
"pg_config --version" | Should -ReturnZeroExitCode
}
It "Aria2" {
"aria2c --version" | Should -ReturnZeroExitCode
}
It "Azcopy" {
"azcopy --version" | Should -ReturnZeroExitCode
}
@@ -200,58 +268,6 @@ Describe "Common utilities" {
It "Composer" {
"composer --version" | Should -ReturnZeroExitCode
}
It "R" -Skip:($os.IsBigSur) {
"R --version" | Should -ReturnZeroExitCode
}
It "zstd" {
"zstd --version" | Should -ReturnZeroExitCode
}
It "bazel" {
"bazel --version" | Should -ReturnZeroExitCode
}
It "bazelisk" {
"bazelisk version" | Should -ReturnZeroExitCode
}
It "Julia" {
"julia --version" | Should -ReturnZeroExitCode
}
It "Packer" {
"packer --version" | Should -ReturnZeroExitCode
}
It "Helm" {
"helm version --short" | Should -ReturnZeroExitCode
}
It "virtualbox" -Skip:($os.IsBigSur) {
"vboxmanage -v" | Should -ReturnZeroExitCode
}
It "vagrant" -Skip:($os.IsBigSur) {
"vagrant --version" | Should -ReturnZeroExitCode
}
It "GitHub CLI" {
"gh --version" | Should -ReturnZeroExitCode
}
It "7-Zip" {
"7z i" | Should -ReturnZeroExitCode
}
It "Apache Ant" {
"ant -version" | Should -ReturnZeroExitCode
}
It "GNU Tar" {
"gtar --version" | Should -ReturnZeroExitCode
}
}
Describe "Rust" -Skip:($os.IsHighSierra) {
@@ -304,33 +320,23 @@ Describe "Haskell" -Skip:($os.IsHighSierra) {
}
}
Describe "Clang/LLVM" -Skip:($os.IsHighSierra) {
It "Clang/LLVM is installed" {
"$(brew --prefix llvm)/bin/clang --version" | Should -ReturnZeroExitCode
}
}
Describe "GCC" -Skip:($os.IsHighSierra) {
$testCases = @("8", "9", "10") | ForEach-Object { @{Version = $_} }
Describe "Gcc" -Skip:($os.IsHighSierra) {
$testCases = @("8", "9", "10") | ForEach-Object { @{GccVersion = $_} }
It "Gcc <GccVersion>" -TestCases $testCases {
It "GCC <Version>" -TestCases $testCases {
param (
[string] $GccVersion
[string] $Version
)
"gcc-$GccVersion --version" | Should -ReturnZeroExitCode
"gcc-$Version --version" | Should -ReturnZeroExitCode
}
}
Describe "Gfortran" -Skip:($os.IsHighSierra) {
$testCases = @("8", "9", "10") | ForEach-Object { @{GfortranVersion = $_} }
It "Gfortran <GfortranVersion>" -TestCases $testCases {
It "Gfortran <Version>" -TestCases $testCases {
param (
[string] $GfortranVersion
[string] $Version
)
"gfortran-$GfortranVersion --version" | Should -ReturnZeroExitCode
"gfortran-$Version --version" | Should -ReturnZeroExitCode
}
It "Gfortran is not found in the default path" {