1
1
/*
2
- * Copyright (c) 2021, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2021, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -65,11 +65,12 @@ public class TestVMProcess {
65
65
private String irEncoding ;
66
66
67
67
public TestVMProcess (List <String > additionalFlags , Class <?> testClass , Set <Class <?>> helperClasses , int defaultWarmup ,
68
- boolean testClassesOnBootClassPath ) {
68
+ boolean allowNotCompilable , boolean testClassesOnBootClassPath ) {
69
69
this .cmds = new ArrayList <>();
70
70
TestFrameworkSocket socket = new TestFrameworkSocket ();
71
71
try (socket ) {
72
- prepareTestVMFlags (additionalFlags , socket , testClass , helperClasses , defaultWarmup , testClassesOnBootClassPath );
72
+ prepareTestVMFlags (additionalFlags , socket , testClass , helperClasses , defaultWarmup ,
73
+ allowNotCompilable , testClassesOnBootClassPath );
73
74
start ();
74
75
}
75
76
processSocketOutput (socket );
@@ -93,7 +94,8 @@ public static String getLastTestVMOutput() {
93
94
}
94
95
95
96
private void prepareTestVMFlags (List <String > additionalFlags , TestFrameworkSocket socket , Class <?> testClass ,
96
- Set <Class <?>> helperClasses , int defaultWarmup , boolean testClassesOnBootClassPath ) {
97
+ Set <Class <?>> helperClasses , int defaultWarmup , boolean allowNotCompilable ,
98
+ boolean testClassesOnBootClassPath ) {
97
99
// Set java.library.path so JNI tests which rely on jtreg nativepath setting work
98
100
cmds .add ("-Djava.library.path=" + Utils .TEST_NATIVE_PATH );
99
101
// Need White Box access in test VM.
@@ -128,6 +130,10 @@ private void prepareTestVMFlags(List<String> additionalFlags, TestFrameworkSocke
128
130
cmds .add ("-DWarmup=" + defaultWarmup );
129
131
}
130
132
133
+ if (allowNotCompilable ) {
134
+ cmds .add ("-DAllowNotCompilable=true" );
135
+ }
136
+
131
137
cmds .add (TestVM .class .getName ());
132
138
cmds .add (testClass .getName ());
133
139
if (helperClasses != null ) {
0 commit comments