mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8326006: Allow TEST_VM_FLAGLESS to set flagless mode
Backport-of: d10f277bd3
This commit is contained in:
committed by
Vitaly Provodin
parent
4a55cc83e4
commit
8d391838a7
@@ -622,14 +622,15 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
* 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();
|
||||
|
||||
Reference in New Issue
Block a user