41
41
from pathlib import Path
42
42
from textwrap import dedent
43
43
44
- from typing import cast
44
+ from typing import cast , Union
45
45
46
46
import downstream_tests
47
47
import mx_graalpython_benchmark
@@ -280,7 +280,7 @@ def libpythonvm_build_args():
280
280
try :
281
281
profile = cmd ([])
282
282
except BaseException :
283
- pass
283
+ mx . log ( f"Not using any PGO profile" )
284
284
else :
285
285
mx .log (f"Using PGO profile { profile } " )
286
286
build_args += [
@@ -1072,7 +1072,7 @@ def is_included(path):
1072
1072
1073
1073
def run_python_unittests (python_binary , args = None , paths = None , exclude = None , env = None ,
1074
1074
use_pytest = False , cwd = None , lock = None , out = None , err = None , nonZeroIsFatal = True , timeout = None ,
1075
- report = False , parallel = None , runner_args = None ):
1075
+ report : Union [ Task , bool , None ] = False , parallel = None , runner_args = None ):
1076
1076
if lock :
1077
1077
lock .acquire ()
1078
1078
@@ -1148,7 +1148,7 @@ def run_python_unittests(python_binary, args=None, paths=None, exclude=None, env
1148
1148
return result
1149
1149
1150
1150
1151
- def run_hpy_unittests (python_binary , args = None , env = None , nonZeroIsFatal = True , timeout = None , report = False ):
1151
+ def run_hpy_unittests (python_binary , args = None , env = None , nonZeroIsFatal = True , timeout = None , report : Union [ Task , bool , None ] = False ):
1152
1152
t0 = time .time ()
1153
1153
result = downstream_tests .downstream_test_hpy (python_binary , args = args , env = env , check = nonZeroIsFatal , timeout = timeout )
1154
1154
if report :
@@ -1160,7 +1160,7 @@ def run_hpy_unittests(python_binary, args=None, env=None, nonZeroIsFatal=True, t
1160
1160
1161
1161
1162
1162
def run_tagged_unittests (python_binary , env = None , cwd = None , nonZeroIsFatal = True , checkIfWithGraalPythonEE = False ,
1163
- report = False , parallel = 8 , exclude = None , paths = ()):
1163
+ report : Union [ Task , bool , None ] = False , parallel = 8 , exclude = None , paths = ()):
1164
1164
1165
1165
if checkIfWithGraalPythonEE :
1166
1166
mx .run ([python_binary , "-c" , "import sys; print(sys.version)" ])
@@ -1432,13 +1432,13 @@ def graalpython_gate_runner(args, tasks):
1432
1432
if task :
1433
1433
run_mx ([
1434
1434
"--dy" , "graalpython,/substratevm" ,
1435
- "-p" , os .path .join (mx .suite ("truffle" ), ".." , "vm" ),
1435
+ "-p" , os .path .join (mx .suite ("truffle" ). dir , ".." , "vm" ),
1436
1436
"--native-images=" ,
1437
1437
"build" ,
1438
1438
], env = {** os .environ , ** LATEST_JAVA_HOME })
1439
1439
run_mx ([
1440
1440
"--dy" , "graalpython,/substratevm" ,
1441
- "-p" , os .path .join (mx .suite ("truffle" ), ".." , "vm" ),
1441
+ "-p" , os .path .join (mx .suite ("truffle" ). dir , ".." , "vm" ),
1442
1442
"--native-images=" ,
1443
1443
"gate" , "svm-truffle-tck-python" ,
1444
1444
])
0 commit comments