@@ -1096,7 +1096,7 @@ def run_python_unittests(python_binary, args=None, paths=None, exclude=None, env
1096
1096
if use_pytest :
1097
1097
args += ["-m" , "pytest" , "-v" , "--assert=plain" , "--tb=native" ]
1098
1098
else :
1099
- args += [_python_test_runner (), "--durations" , "10" , "-n" , str (parallel ), f"--subprocess-args={ shlex .join (args )} " ]
1099
+ args += [_python_test_runner (), "--durations" , "10" , "-n" , str (min ( os . cpu_count (), parallel ) ), f"--subprocess-args={ shlex .join (args )} " ]
1100
1100
1101
1101
if runner_args :
1102
1102
args += runner_args
@@ -1236,7 +1236,7 @@ def is_alive(self):
1236
1236
1237
1237
1238
1238
def run_tagged_unittests (python_binary , env = None , cwd = None , nonZeroIsFatal = True , checkIfWithGraalPythonEE = False ,
1239
- report = False , parallel = min ( os . cpu_count (), 8 ) , exclude = None , runner_args = ()):
1239
+ report = False , parallel = 8 , exclude = None , runner_args = ()):
1240
1240
sub_env = dict (env or os .environ )
1241
1241
sub_env ['PYTHONPATH' ] = os .path .join (_dev_pythonhome (), 'lib-python' , '3' )
1242
1242
@@ -1332,30 +1332,31 @@ def graalpython_gate_runner(args, tasks):
1332
1332
run_python_unittests (
1333
1333
graalpy_standalone_jvm (),
1334
1334
nonZeroIsFatal = nonZeroIsFatal ,
1335
- report = report ()
1335
+ report = report (),
1336
+ parallel = 6 ,
1336
1337
)
1337
1338
1338
1339
with Task ('GraalPython Python unittests with CPython' , tasks , tags = [GraalPythonTags .unittest_cpython ]) as task :
1339
1340
if task :
1340
1341
env = extend_os_env (PYTHONHASHSEED = '0' )
1341
- test_args = [get_cpython (), _python_test_runner (), "-n" , "1 " , "graalpython/com.oracle.graal.python.test/src/tests" ]
1342
+ test_args = [get_cpython (), _python_test_runner (), "-n" , "6 " , "graalpython/com.oracle.graal.python.test/src/tests" ]
1342
1343
mx .run (test_args , nonZeroIsFatal = True , env = env )
1343
1344
1344
1345
with Task ('GraalPython sandboxed tests' , tasks , tags = [GraalPythonTags .unittest_sandboxed ]) as task :
1345
1346
if task :
1346
- run_python_unittests (graalpy_standalone_jvm_enterprise (), args = SANDBOXED_OPTIONS , report = report ())
1347
+ run_python_unittests (graalpy_standalone_jvm_enterprise (), args = SANDBOXED_OPTIONS , report = report (), parallel = 6 )
1347
1348
1348
1349
with Task ('GraalPython multi-context unittests' , tasks , tags = [GraalPythonTags .unittest_multi ]) as task :
1349
1350
if task :
1350
- run_python_unittests (graalpy_standalone_jvm (), args = ["-multi-context" ], nonZeroIsFatal = nonZeroIsFatal , report = report ())
1351
+ run_python_unittests (graalpy_standalone_jvm (), args = ["-multi-context" ], nonZeroIsFatal = nonZeroIsFatal , parallel = 6 , report = report ())
1351
1352
1352
1353
with Task ('GraalPython Jython emulation tests' , tasks , tags = [GraalPythonTags .unittest_jython ]) as task :
1353
1354
if task :
1354
1355
run_python_unittests (graalpy_standalone_jvm (), args = ["--python.EmulateJython" ], paths = ["test_interop.py" ], report = report (), nonZeroIsFatal = nonZeroIsFatal )
1355
1356
1356
1357
with Task ('GraalPython with Arrow Storage Strategy' , tasks , tags = [GraalPythonTags .unittest_arrow ]) as task :
1357
1358
if task :
1358
- run_python_unittests (graalpy_standalone_jvm (), args = ["--python.UseNativePrimitiveStorageStrategy" ], report = report (), nonZeroIsFatal = nonZeroIsFatal )
1359
+ run_python_unittests (graalpy_standalone_jvm (), args = ["--python.UseNativePrimitiveStorageStrategy" ], parallel = 6 , report = report (), nonZeroIsFatal = nonZeroIsFatal )
1359
1360
1360
1361
with Task ('GraalPython HPy tests' , tasks , tags = [GraalPythonTags .unittest_hpy ]) as task :
1361
1362
if task :
@@ -1417,6 +1418,7 @@ def graalpython_gate_runner(args, tasks):
1417
1418
graalpy_standalone_jvm (),
1418
1419
paths = ["graalpython/com.oracle.graal.python.test/src/tests/standalone" ],
1419
1420
env = env ,
1421
+ parallel = 3 ,
1420
1422
)
1421
1423
1422
1424
with Task ('GraalPython Python tests' , tasks , tags = [GraalPythonTags .tagged ]) as task :
@@ -1427,11 +1429,11 @@ def graalpython_gate_runner(args, tasks):
1427
1429
# Unittests on SVM
1428
1430
with Task ('GraalPython tests on SVM' , tasks , tags = [GraalPythonTags .svmunit , GraalPythonTags .windows ]) as task :
1429
1431
if task :
1430
- run_python_unittests (graalpy_standalone_native (), report = report ())
1432
+ run_python_unittests (graalpy_standalone_native (), parallel = 8 , report = report ())
1431
1433
1432
1434
with Task ('GraalPython sandboxed tests on SVM' , tasks , tags = [GraalPythonTags .svmunit_sandboxed ]) as task :
1433
1435
if task :
1434
- run_python_unittests (graalpy_standalone_native_enterprise (), args = SANDBOXED_OPTIONS , report = report ())
1436
+ run_python_unittests (graalpy_standalone_native_enterprise (), parallel = 8 , args = SANDBOXED_OPTIONS , report = report ())
1435
1437
1436
1438
with Task ('GraalPython license header update' , tasks , tags = [GraalPythonTags .license ]) as task :
1437
1439
if task :
@@ -2457,11 +2459,11 @@ def python_coverage(args):
2457
2459
"test_multiprocessing_graalpy" ,
2458
2460
]
2459
2461
if kwds .pop ("tagged" , False ):
2460
- run_tagged_unittests (executable , env = env , nonZeroIsFatal = False , parallel = 1 , exclude = tagged_exclude , runner_args = ['--continue-on-collection-errors' ])
2462
+ run_tagged_unittests (executable , env = env , nonZeroIsFatal = False , parallel = 6 , exclude = tagged_exclude , runner_args = ['--continue-on-collection-errors' ])
2461
2463
elif kwds .pop ("hpy" , False ):
2462
2464
run_hpy_unittests (executable , env = env , nonZeroIsFatal = False , timeout = 5 * 60 * 60 ) # hpy unittests are really slow under coverage
2463
2465
else :
2464
- run_python_unittests (executable , env = env , nonZeroIsFatal = False , timeout = 3600 , parallel = 1 , ** kwds ) # pylint: disable=unexpected-keyword-arg;
2466
+ run_python_unittests (executable , env = env , nonZeroIsFatal = False , timeout = 3600 , parallel = 6 , ** kwds ) # pylint: disable=unexpected-keyword-arg;
2465
2467
2466
2468
# generate a synthetic lcov file that includes all sources with 0
2467
2469
# coverage. this is to ensure all sources actuall show up - otherwise,
0 commit comments