@@ -254,6 +254,7 @@ def python3_unittests(args):
254
254
class GraalPythonTags (object ):
255
255
junit = 'python-junit'
256
256
unittest = 'python-unittest'
257
+ cpyext = 'python-cpyext'
257
258
benchmarks = 'python-benchmarks'
258
259
downstream = 'python-downstream'
259
260
graalvm = 'python-graalvm'
@@ -331,17 +332,28 @@ def python_svm(args):
331
332
332
333
333
334
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/"
334
337
with Task ('GraalPython JUnit' , tasks , tags = [GraalPythonTags .junit ]) as task :
335
338
if task :
336
339
punittest (['--verbose' ])
337
340
338
341
with Task ('GraalPython Python tests' , tasks , tags = [GraalPythonTags .unittest ]) as task :
339
342
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/" ]
342
344
mx .command_function ("python" )(test_args )
343
345
if platform .system () != 'Darwin' :
344
346
# 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" )
345
357
mx .run (["python3" ] + test_args , nonZeroIsFatal = True )
346
358
347
359
with Task ('GraalPython downstream R tests' , tasks , tags = [GraalPythonTags .downstream , GraalPythonTags .R ]) as task :
0 commit comments