From 44af3415a5b1d1e8348b81d983578f3cd8ac05f9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 13 Apr 2017 03:11:59 +0200 Subject: fix octphy, fix conf, improve logging Clearly separate the kinds of BTS hardware the GSM tester knows ('type') from the NITB's bts/type config item ('osmobsc_bts_type' -- not 'osmonitb_...' to stay in tune with future developments: it is the libbsc that needs this). For BTS hardware kinds, use the full name of the binary for osmo driven models: osmo-bts-sysmo, osmo-bts-trx, osmo-bts-octphy. Change-Id: I1aa9b48e74013a93f9db1a34730f17717fb3b36c --- src/osmo_gsm_tester/config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/osmo_gsm_tester/config.py') diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py index cbbfa6f..68bbd13 100644 --- a/src/osmo_gsm_tester/config.py +++ b/src/osmo_gsm_tester/config.py @@ -177,6 +177,12 @@ def get_defaults(for_kind): defaults = read_config_file('default.conf', if_missing_return={}) return defaults.get(for_kind, {}) +class Scenario(log.Origin, dict): + def __init__(self, name, path): + self.set_name(name) + self.set_log_category(log.C_TST) + self.path = path + def get_scenario(name, validation_schema=None): scenarios_dir = get_scenarios_dir() if not name.endswith('.conf'): @@ -184,7 +190,9 @@ def get_scenario(name, validation_schema=None): path = scenarios_dir.child(name) if not os.path.isfile(path): raise RuntimeError('No such scenario file: %r' % path) - return read(path, validation_schema=validation_schema) + sc = Scenario(name, path) + sc.update(read(path, validation_schema=validation_schema)) + return sc def add(dest, src): if is_dict(dest): -- cgit v1.2.3