mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-18 07:46:45 +00:00
[Ubuntu] Add verbosity during software report generation (#4811)
* Add verbosity during software report generation * Fix Get-CpanVersion * set default ValidateExitCode value to $true * update java test * use lower-case for parameters
This commit is contained in:
committed by
GitHub
parent
bb56fb7ef4
commit
92eeb55189
@@ -29,8 +29,7 @@ Describe "Java" {
|
||||
$gradleVariableValue | Should -BeLike "/usr/share/gradle-*"
|
||||
|
||||
$gradlePath = Join-Path $env:GRADLE_HOME "bin/gradle"
|
||||
$result = Get-CommandResult "`"$GradlePath`" -version"
|
||||
$result.ExitCode | Should -Be 0
|
||||
"`"$GradlePath`" -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Java <Version>" -TestCases $jdkVersions {
|
||||
@@ -38,12 +37,11 @@ Describe "Java" {
|
||||
$javaVariableValue | Should -Not -BeNullOrEmpty
|
||||
$javaPath = Join-Path $javaVariableValue "bin/java"
|
||||
|
||||
$result = Get-CommandResult "`"$javaPath`" -version"
|
||||
$result.ExitCode | Should -Be 0
|
||||
"`"$javaPath`" -version" | Should -ReturnZeroExitCode
|
||||
|
||||
if ($Version -eq 8) {
|
||||
$Version = "1.${Version}"
|
||||
}
|
||||
$result.Output | Should -Match ([regex]::Escape("openjdk version `"${Version}."))
|
||||
"`"$javaPath`" -version" | Should -MatchCommandOutput ([regex]::Escape("openjdk version `"${Version}."))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user