mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 18:21:14 +00:00
Merge pull request #504 from setrofim/energy-backend-param-fix
framework/target: fix runtime param name resolution
This commit is contained in:
commit
ad08cbfe37
@ -7,7 +7,7 @@ from wa.framework.target.runtime_config import (SysfileValuesRuntimeConfig,
|
||||
CpufreqRuntimeConfig,
|
||||
CpuidleRuntimeConfig,
|
||||
AndroidRuntimeConfig)
|
||||
from wa.utils.types import obj_dict
|
||||
from wa.utils.types import obj_dict, caseless_string
|
||||
|
||||
|
||||
class RuntimeParameterManager(object):
|
||||
@ -74,13 +74,13 @@ class RuntimeParameterManager(object):
|
||||
cfg.set_defaults()
|
||||
|
||||
def get_config_for_name(self, name):
|
||||
for rp_name, rp in self.runtime_params.iteritems():
|
||||
if re.search(name, rp_name):
|
||||
return rp.rt_config
|
||||
name = caseless_string(name)
|
||||
if name in self.runtime_params:
|
||||
return self.runtime_params[name].rt_config
|
||||
return None
|
||||
|
||||
def get_cfg_point(self, name):
|
||||
for rp_name, rp in self.runtime_params.iteritems():
|
||||
if re.search(name, rp_name, re.IGNORECASE):
|
||||
return rp.cfg_point
|
||||
name = caseless_string(name)
|
||||
if name in self.runtime_params:
|
||||
return self.runtime_params[name].cfg_point
|
||||
raise ConfigError('Unknown Runtime Parameter: {}'.format(name))
|
||||
|
Loading…
x
Reference in New Issue
Block a user