mirror of https://github.com/graalvm/mx.git
[GR-58270] Hotfix for vm config resolution.
PullRequest: mx/1848
This commit is contained in:
commit
c814bf997b
|
@ -18215,7 +18215,7 @@ def main():
|
|||
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))
|
||||
|
||||
# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
|
||||
version = VersionSpec("7.34.0") # [GR-58270] Allow syntactic sugar to configure benchmark VM configs
|
||||
version = VersionSpec("7.34.1") # [GR-58270] lazily check benchmark VM configs
|
||||
|
||||
_mx_start_datetime = datetime.utcnow()
|
||||
|
||||
|
|
|
@ -432,12 +432,13 @@ class VmRegistry(object):
|
|||
def get_vm(self, vm_name, vm_config):
|
||||
resolved_name = None
|
||||
for (candidate_vm_name, candidate_vm_config), candidate_vm in self._vms.items():
|
||||
canonical_name = candidate_vm.canonical_config_name(vm_config)
|
||||
if vm_name == candidate_vm_name and canonical_name == candidate_vm_config:
|
||||
resolved_name = candidate_vm_config
|
||||
if vm_config != canonical_name:
|
||||
mx.log(f"Canonicalized the '{vm_config}' vm config to: {resolved_name}")
|
||||
break
|
||||
if vm_name == candidate_vm_name:
|
||||
canonical_name = candidate_vm.canonical_config_name(vm_config)
|
||||
if canonical_name == candidate_vm_config:
|
||||
resolved_name = candidate_vm_config
|
||||
if vm_config != canonical_name:
|
||||
mx.log(f"Canonicalized the '{vm_config}' vm config to: {resolved_name}")
|
||||
break
|
||||
key = (vm_name, resolved_name or vm_config)
|
||||
if key not in self._vms:
|
||||
mx.abort(f"{self.vm_type_name} and config '{key}' do not exist.\n{self.get_available_vm_configs_help()}")
|
||||
|
|
Loading…
Reference in New Issue