mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
[Ubuntu] Migrate tests for common tools to Pester (part 1) (#2288)
* add common tools tests pt1 * fix tests * fix erlang test * resolve comments * minor changes * remove extra logging
This commit is contained in:
committed by
GitHub
parent
7ff71c853d
commit
a9a236f7e5
@@ -14,4 +14,74 @@ Describe "azcopy" {
|
||||
It "azcopy10" {
|
||||
"azcopy10 --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Ansible" {
|
||||
It "Ansible" {
|
||||
"ansible --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Bazel" {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "bazel" }
|
||||
@{ ToolName = "bazelisk" }
|
||||
) {
|
||||
"$ToolName --version"| Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "clang" {
|
||||
[array]$testCases = (Get-ToolsetContent).clang.Versions | ForEach-Object { @{ClangVersion = $_} }
|
||||
|
||||
It "clang <ClangVersion>" -TestCases $testCases {
|
||||
param (
|
||||
[string] $ClangVersion
|
||||
)
|
||||
|
||||
"clang-$ClangVersion --version" | Should -ReturnZeroExitCode
|
||||
"clang++-$ClangVersion --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Cmake" {
|
||||
It "cmake" {
|
||||
"cmake --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "erlang" {
|
||||
$testCases = @("erl", "erlc", "rebar3") | ForEach-Object { @{ErlangCommand = $_} }
|
||||
|
||||
It "erlang <ErlangCommand>" -TestCases $testCases {
|
||||
param (
|
||||
[string] $ErlangCommand
|
||||
)
|
||||
|
||||
"$ErlangCommand -v" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "gcc" {
|
||||
[array]$testCases = (Get-ToolsetContent).gcc.Versions | ForEach-Object { @{GccVersion = $_} }
|
||||
|
||||
It "gcc <GccVersion>" -TestCases $testCases {
|
||||
param (
|
||||
[string] $GccVersion
|
||||
)
|
||||
|
||||
"$GccVersion --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "gfortran" {
|
||||
[array]$testCases = (Get-ToolsetContent).gfortran.Versions | ForEach-Object { @{GfortranVersion = $_} }
|
||||
|
||||
It "gfortran <GfortranVersion>" -TestCases $testCases {
|
||||
param (
|
||||
[string] $GfortranVersion
|
||||
)
|
||||
|
||||
"$GfortranVersion --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user