[Windows] Add Adoptium (Temurin-Hotspot) jdk 17 LTS (#4129)

This commit is contained in:
Mikhail Koliada
2021-09-24 11:05:25 +03:00
committed by GitHub
parent 93b173e9cb
commit ee4eda5e99
4 changed files with 9 additions and 7 deletions

View File

@@ -36,18 +36,20 @@ Describe "Java" {
if ($Version -eq 8) { if ($Version -eq 8) {
$Version = "1.${Version}" $Version = "1.${Version}"
} }
$result.Output[0] | Should -Match ([regex]::Escape("openjdk version `"${Version}.")) $outputPattern = "openjdk version `"${Version}"
$result.Output[0] | Should -Match $outputPattern
} }
It "Java Adopt Jdk <Version>" -TestCases $adoptJdkVersions { It "Java Adopt Jdk <Version>" -TestCases $adoptJdkVersions {
$adoptPath = Join-Path (Get-ChildItem ${env:AGENT_TOOLSDIRECTORY}\Java_Adopt_jdk\${Version}*) "x64\bin\java" $adoptPath = Join-Path (Get-ChildItem ${env:AGENT_TOOLSDIRECTORY}\Java_Adopt_jdk\${Version}*) "x64\bin\java"
$result = Get-CommandResult "`"$adoptPath`" -version" $result = Get-CommandResult "`"$adoptPath`" -version"
$result.ExitCode | Should -Be 0 $result.ExitCode | Should -Be 0
if ($Version -eq 8) { if ($Version -eq 8) {
$Version = "1.${Version}" $Version = "1.${Version}"
} }
$result.Output[0] | Should -Match ([regex]::Escape("openjdk version `"${Version}.")) $outputPattern = "openjdk version `"${Version}"
$result.Output[0] | Should -Match $outputPattern
} }
} }

View File

@@ -146,7 +146,7 @@
"vendors": [ "vendors": [
{ {
"name": "Temurin-Hotspot", "name": "Temurin-Hotspot",
"versions": [ "8", "11" ] "versions": [ "8", "11", "17" ]
}, },
{ {
"name": "Adopt", "name": "Adopt",

View File

@@ -146,7 +146,7 @@
"vendors": [ "vendors": [
{ {
"name": "Temurin-Hotspot", "name": "Temurin-Hotspot",
"versions": [ "8", "11" ] "versions": [ "8", "11", "17" ]
}, },
{ {
"name": "Adopt", "name": "Adopt",

View File

@@ -110,7 +110,7 @@
"vendors": [ "vendors": [
{ {
"name": "Temurin-Hotspot", "name": "Temurin-Hotspot",
"versions": [ "8", "11" ] "versions": [ "8", "11", "17" ]
}, },
{ {
"name": "Adopt", "name": "Adopt",