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
diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index 08965b5..74c8b28 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -20,6 +20,7 @@
import os
import sys
import time
+import copy
from . import config, log, template, util, resource, schema, ofono_client, osmo_nitb
from . import test
@@ -56,7 +57,6 @@
SuiteDefinition.CONF_SCHEMA)
self.load_tests()
-
def load_tests(self):
with self:
self.tests = []
@@ -122,22 +122,27 @@
_config = None
_processes = None
- def __init__(self, current_trial, suite_definition, scenarios=[]):
+ def __init__(self, current_trial, suite_scenario_str, suite_definition, scenarios=[]):
self.trial = current_trial
self.definition = suite_definition
self.scenarios = scenarios
- self.set_name(suite_definition.name())
+ self.set_name(suite_scenario_str)
self.set_log_category(log.C_TST)
self.resources_pool = resource.ResourcesPool()
def combined(self, conf_name):
- combination = self.definition.conf.get(conf_name) or {}
- for scenario in self.scenarios:
- c = scenario.get(conf_name)
- if c is None:
- continue
- config.combine(combination, c)
- return combination
+ self.dbg(combining=conf_name)
+ with log.Origin(combining_scenarios=conf_name):
+ combination = copy.deepcopy(self.definition.conf.get(conf_name) or {})
+ self.dbg(definition_conf=combination)
+ for scenario in self.scenarios:
+ with scenario:
+ c = scenario.get(conf_name)
+ self.dbg(scenario=scenario.name(), conf=c)
+ if c is None:
+ continue
+ config.combine(combination, c)
+ return combination
def resource_requirements(self):
if self._resource_requirements is None:
@@ -183,6 +188,7 @@
self.reserved_resources = self.resources_pool.reserve(self, self.resource_requirements())
def run_tests(self, names=None):
+ self.log('Suite run start')
if not self.reserved_resources:
self.reserve_resources()
results = SuiteRun.Results()
@@ -281,7 +287,6 @@
self.log('prompt entered:', entered)
return entered
-
loaded_suite_definitions = {}
def load(suite_name):
@@ -319,7 +324,7 @@
suite_name, scenario_names = parse_suite_scenario_str(suite_scenario_str)
suite = load(suite_name)
scenarios = [config.get_scenario(scenario_name) for scenario_name in scenario_names]
- return (suite, scenarios)
+ return (suite_scenario_str, suite, scenarios)
def bts_obj(suite_run, conf):
bts_type = conf.get('type')