Skip to content

Commit 1dc4ab8

Browse files
committed
Add Python gate tag 'python-cpyext'.
1 parent 5bf53a2 commit 1dc4ab8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ def python3_unittests(args):
254254
class GraalPythonTags(object):
255255
junit = 'python-junit'
256256
unittest = 'python-unittest'
257+
cpyext = 'python-cpyext'
257258
benchmarks = 'python-benchmarks'
258259
downstream = 'python-downstream'
259260
graalvm = 'python-graalvm'
@@ -331,17 +332,28 @@ def python_svm(args):
331332

332333

333334
def graalpython_gate_runner(args, tasks):
335+
_graalpytest_driver = "graalpython/com.oracle.graal.python.test/src/graalpytest.py"
336+
_test_project = "graalpython/com.oracle.graal.python.test/"
334337
with Task('GraalPython JUnit', tasks, tags=[GraalPythonTags.junit]) as task:
335338
if task:
336339
punittest(['--verbose'])
337340

338341
with Task('GraalPython Python tests', tasks, tags=[GraalPythonTags.unittest]) as task:
339342
if task:
340-
test_args = ["graalpython/com.oracle.graal.python.test/src/graalpytest.py", "-v",
341-
"graalpython/com.oracle.graal.python.test/src/tests/"]
343+
test_args = [_graalpytest_driver, "-v", _test_project + "src/tests/"]
342344
mx.command_function("python")(test_args)
343345
if platform.system() != 'Darwin':
344346
# TODO: re-enable when python3 is available on darwin
347+
mx.log("Running tests with CPython")
348+
mx.run(["python3"] + test_args, nonZeroIsFatal=True)
349+
350+
with Task('GraalPython C extension tests', tasks, tags=[GraalPythonTags.cpyext]) as task:
351+
if task:
352+
test_args = [_graalpytest_driver, "-v", _test_project + "src/tests/cpyext/"]
353+
mx.command_function("python")(test_args)
354+
if platform.system() != 'Darwin':
355+
# TODO: re-enable when python3 is available on darwin
356+
mx.log("Running tests with CPython")
345357
mx.run(["python3"] + test_args, nonZeroIsFatal=True)
346358

347359
with Task('GraalPython downstream R tests', tasks, tags=[GraalPythonTags.downstream, GraalPythonTags.R]) as task:

0 commit comments

Comments
 (0)