Skip to content

Commit 3f75095

Browse files
timfelfangerer
authored andcommitted
add a gate tag to run our python unittests with and aot binary
1 parent b61fbf9 commit 3f75095

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ class GraalPythonTags(object):
255255
junit = 'python-junit'
256256
unittest = 'python-unittest'
257257
cpyext = 'python-cpyext'
258+
svmunit = 'python-svm-unitttest'
258259
benchmarks = 'python-benchmarks'
259260
downstream = 'python-downstream'
260261
graalvm = 'python-graalvm'
@@ -356,6 +357,16 @@ def graalpython_gate_runner(args, tasks):
356357
mx.log("Running tests with CPython")
357358
mx.run(["python3"] + test_args, nonZeroIsFatal=True)
358359

360+
with Task('GraalPython Python tests on SVM', tasks, tags=[GraalPythonTags.svmunit]) as task:
361+
if task:
362+
if not os.path.exists("./graalpython-svm"):
363+
python_svm(["-h"])
364+
if os.path.exists("./graalpython-svm"):
365+
langhome = mx_subst.path_substitutions.substitute('--native.Dllvm.home=<path:SULONG_LIBS>')
366+
test_args = ["graalpython/com.oracle.graal.python.test/src/graalpytest.py", "-v",
367+
"graalpython/com.oracle.graal.python.test/src/tests/"]
368+
mx.run(["./graalpython-svm", "--python.CoreHome=graalpython/lib-graalpython", "--python.StdLibHome=graalpython/lib-python/3", langhome] + test_args, nonZeroIsFatal=True)
369+
359370
with Task('GraalPython downstream R tests', tasks, tags=[GraalPythonTags.downstream, GraalPythonTags.R]) as task:
360371
script_r2p = os.path.join(_suite.dir, "graalpython", "benchmarks", "src", "benchmarks", "interop", "r_python_image_demo.r")
361372
script_p2r = os.path.join(_suite.dir, "graalpython", "benchmarks", "src", "benchmarks", "interop", "python_r_image_demo.py")

0 commit comments

Comments
 (0)