@@ -255,7 +255,7 @@ class GraalPythonTags(object):
255
255
junit = 'python-junit'
256
256
unittest = 'python-unittest'
257
257
cpyext = 'python-cpyext'
258
- svmunit = 'python-svm-unitttest '
258
+ svmunit = 'python-svm-unittest '
259
259
benchmarks = 'python-benchmarks'
260
260
downstream = 'python-downstream'
261
261
graalvm = 'python-graalvm'
@@ -363,8 +363,34 @@ def graalpython_gate_runner(args, tasks):
363
363
python_svm (["-h" ])
364
364
if os .path .exists ("./graalpython-svm" ):
365
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/" ]
366
+
367
+ # tests root directory
368
+ tests_folder = "graalpython/com.oracle.graal.python.test/src/tests/"
369
+
370
+ # list of excluded tests
371
+ excluded = ["test_interop.py" ]
372
+
373
+ def is_included (path ):
374
+ if path .endswith (".py" ):
375
+ basename = path .rpartition ("/" )[2 ]
376
+ return basename .startswith ("test_" ) and basename not in excluded
377
+ return False
378
+
379
+ # list all 1st-level tests and exclude the SVM-incompatible ones
380
+ testfiles = []
381
+ paths = [tests_folder ]
382
+ while paths :
383
+ path = paths .pop ()
384
+ if is_included (path ):
385
+ testfiles .append (path )
386
+ else :
387
+ try :
388
+ paths += [(path + f if path .endswith ("/" ) else "%s/%s" % (path , f )) for f in
389
+ os .listdir (path )]
390
+ except OSError :
391
+ pass
392
+
393
+ test_args = ["graalpython/com.oracle.graal.python.test/src/graalpytest.py" , "-v" ] + testfiles
368
394
mx .run (["./graalpython-svm" , "--python.CoreHome=graalpython/lib-graalpython" , "--python.StdLibHome=graalpython/lib-python/3" , langhome ] + test_args , nonZeroIsFatal = True )
369
395
370
396
with Task ('GraalPython downstream R tests' , tasks , tags = [GraalPythonTags .downstream , GraalPythonTags .R ]) as task :
0 commit comments