Skip to content

Commit ea00209

Browse files
committed
polyglot isolate tests must run on enterprise graal jdk
1 parent a0b2024 commit ea00209

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ def graalpy_standalone_native_enterprise():
717717
return os.path.join(graalpy_standalone_home('native', enterprise=True), 'bin', _graalpy_launcher())
718718

719719

720-
def graalvm_jdk():
720+
def graalvm_jdk(enterprise=False):
721721
jdk_version = mx.get_jdk().version
722722

723723
# Check if GRAAL_JDK_HOME points to some compatible pre-built gvm
@@ -756,9 +756,14 @@ def graalvm_jdk():
756756
return graal_jdk_home
757757

758758
jdk_major_version = mx.get_jdk().version.parts[0]
759-
mx_args = ['-p', os.path.join(mx.suite('truffle').dir, '..', 'vm'), '--env', 'ce']
759+
if enterprise:
760+
mx_args = ['-p', os.path.join(mx.suite('truffle').dir, '..', '..', 'graal-enterprise', 'vm-enterprise'), '--env', 'ee']
761+
edition = ""
762+
else:
763+
mx_args = ['-p', os.path.join(mx.suite('truffle').dir, '..', 'vm'), '--env', 'ce']
764+
edition = "COMMUNITY_"
760765
if not DISABLE_REBUILD:
761-
run_mx(mx_args + ["build", "--dep", f"GRAALVM_COMMUNITY_JAVA{jdk_major_version}"], env={**os.environ, **LATEST_JAVA_HOME})
766+
run_mx(mx_args + ["build", "--dep", f"GRAALVM_{edition}JAVA{jdk_major_version}"], env={**os.environ, **LATEST_JAVA_HOME})
762767
out = mx.OutputCapture()
763768
run_mx(mx_args + ["graalvm-home"], out=out)
764769
return out.data.splitlines()[-1].strip()
@@ -1231,14 +1236,14 @@ def graalpython_gate_runner(args, tasks):
12311236
env['PATH'] = get_path_with_patchelf()
12321237

12331238
mx.log("Running integration JUnit tests on GraalVM SDK with external polyglot isolates")
1234-
env['JAVA_HOME'] = graalvm_jdk()
1239+
env['JAVA_HOME'] = graalvm_jdk(enterprise=True)
12351240
mx.run_maven(mvn_cmd_base + [
12361241
'-U',
12371242
'-Dpolyglot.engine.AllowExperimentalOptions=true',
12381243
'-Dpolyglot.engine.SpawnIsolate=true',
12391244
'-Dpolyglot.engine.IsolateMode=external',
12401245
'clean',
1241-
'test'
1246+
'test',
12421247
], env=env)
12431248

12441249
# Unittests on JVM

0 commit comments

Comments
 (0)