Skip to content

Commit d9ea172

Browse files
committed
fix benchmarks to run with sulong and underscores in names
1 parent 14c7ffd commit d9ea172

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from os.path import join
3131

3232
import mx
33+
import mx_subst
3334
from mx_benchmark import StdOutRule, VmRegistry, java_vm_registry, Vm, GuestVm, VmBenchmarkSuite, AveragingBenchmarkMixin
3435
from mx_graalpython_bench_param import BENCHMARKS, HARNESS_PATH
3536

@@ -155,10 +156,14 @@ def run(self, cwd, args):
155156
# '-Dgraal.TruffleCompilationExceptionsAreFatal=true'
156157
]
157158

158-
vm_args = [
159+
dists = ["GRAALPYTHON", "GRAALPYTHON-LAUNCHER"]
160+
if mx.suite("sulong", fatalIfMissing=False):
161+
dists.append('SULONG')
162+
if mx.suite("sulong-managed", fatalIfMissing=False):
163+
dists.append('SULONG_MANAGED')
164+
165+
vm_args = mx.get_runtime_jvm_args(dists) + [
159166
"-Dpython.home=%s" % join(_graalpython_suite.dir, "graalpython"),
160-
'-cp',
161-
mx.classpath(["com.oracle.graal.python", "com.oracle.graal.python.shell"]),
162167
"com.oracle.graal.python.shell.GraalPythonMain"
163168
]
164169

@@ -265,8 +270,8 @@ def benchmarks(self):
265270

266271
def successPatterns(self):
267272
return [
268-
re.compile(r"^### iteration=(?P<iteration>[0-9]+), name=(?P<benchmark>[a-zA-Z0-9.\-]+), duration=(?P<time>[0-9]+(\.[0-9]+)?$)", re.MULTILINE), # pylint: disable=line-too-long
269-
re.compile(r"^@@@ name=(?P<benchmark>[a-zA-Z0-9.\-]+), duration=(?P<time>[0-9]+(\.[0-9]+)?$)", re.MULTILINE), # pylint: disable=line-too-long
273+
re.compile(r"^### iteration=(?P<iteration>[0-9]+), name=(?P<benchmark>[a-zA-Z0-9.\-_]+), duration=(?P<time>[0-9]+(\.[0-9]+)?$)", re.MULTILINE), # pylint: disable=line-too-long
274+
re.compile(r"^@@@ name=(?P<benchmark>[a-zA-Z0-9.\-_]+), duration=(?P<time>[0-9]+(\.[0-9]+)?$)", re.MULTILINE), # pylint: disable=line-too-long
270275
]
271276

272277
def failurePatterns(self):

0 commit comments

Comments
 (0)