Skip to content

Commit

Permalink
fixed support for GraalVM CE
Browse files Browse the repository at this point in the history
  • Loading branch information
ennerf committed Nov 10, 2023
1 parent c685783 commit e017534
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public Version getGraalVersion() throws IOException {
}

static Version parseGraalVersion(String versionString) {
String pattern = "GraalVM (\\d{1,2}(\\.\\d+){0,2})";
String pattern = "GraalVM .*?(\\d{1,2}(\\.\\d+){0,2})";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(versionString);
if (!m.find())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ static Stream<Arguments> graalVersionOutputs() {
// graalvm-jdk-21.0.1+12.1
Arguments.of(new Version("21.0.1"), new Version("21.0.1"), "java version \"21.0.1\" 2023-10-17\n" +
"Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)\n" +
"Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)")
"Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)"),

Arguments.of(new Version("17.0.7"), new Version("17.0.7"), "openjdk version \"17.0.7\" 2023-04-18\n" +
"OpenJDK Runtime Environment GraalVM CE 17.0.7+7.1 (build 17.0.7+7-jvmci-23.0-b12)\n" +
"OpenJDK 64-Bit Server VM GraalVM CE 17.0.7+7.1 (build 17.0.7+7-jvmci-23.0-b12, mixed mode, sharing)"),

Arguments.of(new Version("21"), new Version("21"), "openjdk version \"21\" 2023-09-19\n" +
"OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)\n" +
"OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)")

);
}
Expand Down

0 comments on commit e017534

Please sign in to comment.