|
62 | 62 |
|
63 | 63 | PYTHON_VM_REGISTRY_NAME = "Python"
|
64 | 64 | CONFIGURATION_DEFAULT = "default"
|
| 65 | +CONFIGURATION_CUSTOM = "custom" |
65 | 66 | CONFIGURATION_INTERPRETER = "interpreter"
|
66 | 67 | CONFIGURATION_NATIVE_INTERPRETER = "native-interpreter"
|
67 | 68 | CONFIGURATION_DEFAULT_MULTI = "default-multi"
|
@@ -279,9 +280,12 @@ def launcher_type(self):
|
279 | 280 | @property
|
280 | 281 | @functools.lru_cache
|
281 | 282 | def interpreter(self):
|
282 |
| - if home := mx.get_env("GRAALPY_HOME"): |
| 283 | + if self.config_name() == CONFIGURATION_CUSTOM: |
| 284 | + home = mx.get_env("GRAALPY_HOME") |
| 285 | + if not home: |
| 286 | + mx.abort("The custom benchmark config for graalpy is to run with a custom GRAALPY_HOME locally") |
283 | 287 | launcher = join(home, "bin", "graalpy")
|
284 |
| - mx.log(f"Using {launcher} based on GRAALPY_HOME environment variable.") |
| 288 | + mx.log(f"Using {launcher} based on GRAALPY_HOME environment for custom config.") |
285 | 289 | return launcher
|
286 | 290 | from mx_graalpython import graalpy_standalone
|
287 | 291 | launcher = graalpy_standalone(self.launcher_type, build=False)
|
@@ -1033,6 +1037,7 @@ def add_graalpy_vm(name, *extra_polyglot_args):
|
1033 | 1037 | python_vm_registry.add_vm(GraalPythonVm(config_name=name, extra_polyglot_args=extra_polyglot_args), suite, 10)
|
1034 | 1038 |
|
1035 | 1039 | # GraalPy VMs:
|
| 1040 | + add_graalpy_vm(CONFIGURATION_CUSTOM) |
1036 | 1041 | add_graalpy_vm(CONFIGURATION_DEFAULT)
|
1037 | 1042 | add_graalpy_vm(CONFIGURATION_INTERPRETER, '--experimental-options', '--engine.Compilation=false')
|
1038 | 1043 | add_graalpy_vm(CONFIGURATION_DEFAULT_MULTI, '--experimental-options', '-multi-context')
|
|
0 commit comments