@@ -531,6 +531,7 @@ def nativeclean(args):
531
531
class GraalPythonTags (object ):
532
532
junit = 'python-junit'
533
533
junit_maven = 'python-junit-maven'
534
+ junit_maven_isolates = 'python-junit-maven-isolates'
534
535
unittest = 'python-unittest'
535
536
unittest_cpython = 'python-unittest-cpython'
536
537
unittest_sandboxed = 'python-unittest-sandboxed'
@@ -1189,6 +1190,29 @@ def graalpython_gate_runner(args, tasks):
1189
1190
1190
1191
# JUnit tests with Maven
1191
1192
with Task ('GraalPython integration JUnit with Maven' , tasks , tags = [GraalPythonTags .junit_maven ]) as task :
1193
+ if task :
1194
+ mvn_repo_path , artifacts_version , env = deploy_local_maven_repo ()
1195
+ mvn_repo_path = pathlib .Path (mvn_repo_path ).as_uri ()
1196
+ central_override = mx_urlrewrites .rewriteurl ('https://repo1.maven.org/maven2/' )
1197
+ pom_path = os .path .join (SUITE .dir , 'graalpython/com.oracle.graal.python.test.integration/pom.xml' )
1198
+ mvn_cmd_base = ['-f' , pom_path ,
1199
+ f'-Dcom.oracle.graal.python.test.polyglot.version={ artifacts_version } ' ,
1200
+ f'-Dcom.oracle.graal.python.test.polyglot_repo={ mvn_repo_path } ' ,
1201
+ f'-Dcom.oracle.graal.python.test.central_repo={ central_override } ' ,
1202
+ '--batch-mode' ]
1203
+
1204
+ env ['PATH' ] = get_path_with_patchelf ()
1205
+
1206
+ mx .log ("Running integration JUnit tests on GraalVM SDK" )
1207
+ env ['JAVA_HOME' ] = graalvm_jdk ()
1208
+ mx .run_maven (mvn_cmd_base + ['-U' , 'clean' , 'test' ], env = env )
1209
+
1210
+ env ['JAVA_HOME' ] = os .environ ['JAVA_HOME' ]
1211
+ mx .log (f"Running integration JUnit tests on vanilla JDK: { os .environ .get ('JAVA_HOME' , 'system java' )} " )
1212
+ mx .run_maven (mvn_cmd_base + ['-U' , '-Dpolyglot.engine.WarnInterpreterOnly=false' , 'clean' , 'test' ], env = env )
1213
+
1214
+ # JUnit tests with Maven and polyglot isolates
1215
+ with Task ('GraalPython integration JUnit with Maven and Polyglot Isolates' , tasks , tags = [GraalPythonTags .junit_maven_isolates ]) as task :
1192
1216
if task :
1193
1217
mvn_repo_path , artifacts_version , env = deploy_local_maven_repo (env = {
1194
1218
"DYNAMIC_IMPORTS" : "/truffle-enterprise,/substratevm-enterprise" ,
@@ -1206,10 +1230,6 @@ def graalpython_gate_runner(args, tasks):
1206
1230
1207
1231
env ['PATH' ] = get_path_with_patchelf ()
1208
1232
1209
- mx .log ("Running integration JUnit tests on GraalVM SDK" )
1210
- env ['JAVA_HOME' ] = graalvm_jdk ()
1211
- mx .run_maven (mvn_cmd_base + ['-U' , 'clean' , 'test' ], env = env )
1212
-
1213
1233
mx .log ("Running integration JUnit tests on GraalVM SDK with external polyglot isolates" )
1214
1234
env ['JAVA_HOME' ] = graalvm_jdk ()
1215
1235
mx .run_maven (mvn_cmd_base + [
@@ -1221,10 +1241,6 @@ def graalpython_gate_runner(args, tasks):
1221
1241
'test'
1222
1242
], env = env )
1223
1243
1224
- env ['JAVA_HOME' ] = os .environ ['JAVA_HOME' ]
1225
- mx .log (f"Running integration JUnit tests on vanilla JDK: { os .environ .get ('JAVA_HOME' , 'system java' )} " )
1226
- mx .run_maven (mvn_cmd_base + ['-U' , '-Dpolyglot.engine.WarnInterpreterOnly=false' , 'clean' , 'test' ], env = env )
1227
-
1228
1244
# Unittests on JVM
1229
1245
with Task ('GraalPython Python unittests' , tasks , tags = [GraalPythonTags .unittest ]) as task :
1230
1246
if task :
0 commit comments