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
Backport-of: d10f277bd39bb5ac9bd48939c916de607fef8ace
  • Loading branch information
Amos Shi committed Apr 23, 2024
1 parent 7af75fb commit 358a35a
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 @@ -571,14 +571,15 @@ private String implementor() {
* 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 = new ArrayList<String>();
Expand Down

1 comment on commit 358a35a

@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.