Skip to content

Commit

Permalink
bring back version check and change it to pattern used in ModuleOptio…
Browse files Browse the repository at this point in the history
…n test
  • Loading branch information
MBaesken committed Nov 5, 2024
1 parent b2f54b7 commit 17b42d1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -49,7 +49,7 @@ public static void main(String[] args) throws Exception {
final String allSystem = "ALL-SYSTEM";
final String allModulePath = "ALL-MODULE-PATH";
final String loggingOption = "-Xlog:cds=debug,cds+module=debug,cds+heap=info,module=trace";
final String versionPattern = "java.[0-9][0-9][-].*";
final String versionPattern = "java.[0-9][0-9].*";
final String subgraphCannotBeUsed = "subgraph jdk.internal.module.ArchivedBootLayer cannot be used because full module graph is disabled";
final String warningIncubator = "WARNING: Using incubator modules: jdk.incubator.vector";
String archiveName = TestCommon.getNewArchiveName("addmods-option");
Expand All @@ -72,7 +72,7 @@ public static void main(String[] args) throws Exception {
"-version");
oa.shouldHaveExitValue(0)
// version of the jdk.httpserver module, e.g. java 22-ea
//.shouldMatch(versionPattern)
.shouldMatch(versionPattern)
.shouldMatch("cds,module.*Restored from archive: entry.0x.*name jdk.jconsole")
.shouldMatch("cds,module.*Restored from archive: entry.0x.*name jdk.httpserver");

Expand Down Expand Up @@ -114,7 +114,7 @@ public static void main(String[] args) throws Exception {
oa.shouldHaveExitValue(0)
.shouldContain("--add-modules module name(s) specified during runtime but not found in archive: jdk.jconsole")
// version of the jdk.httpserver module, e.g. java 22-ea
//.shouldMatch(versionPattern)
.shouldMatch(versionPattern)
.shouldContain(subgraphCannotBeUsed);

// dump an archive with an incubator module, -add-modules jdk.incubator.vector
Expand Down

0 comments on commit 17b42d1

Please sign in to comment.