Skip to content

Commit

Permalink
8326006: Allow TEST_VM_FLAGLESS to set flagless mode
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, ayang
  • Loading branch information
lmesnik committed Feb 23, 2024
1 parent 63f6a56 commit d10f277
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/jtreg-ext/requires/VMProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,15 @@ private String jdkContainerized() {
* Checks if we are in <i>almost</i> out-of-box configuration, i.e. the flags
* which JVM is started with don't affect its behavior "significantly".
* {@code TEST_VM_FLAGLESS} enviroment variable can be used to force this
* method to return true and allow any flags.
* method to return true or false and allow or reject any flags.
*
* @return true if there are no JVM flags
*/
private String isFlagless() {
boolean result = true;
if (System.getenv("TEST_VM_FLAGLESS") != null) {
return "" + result;
String flagless = System.getenv("TEST_VM_FLAGLESS");
if (flagless != null) {
return "" + "true".equalsIgnoreCase(flagless);
}

List<String> allFlags = allFlags().toList();
Expand Down

1 comment on commit d10f277

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.