This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2915 to look at the new patch set (#3). Use a subdir of run_dir for each test Processes created have the scope of the test, so we should store everything in a per-suite_run/per-test directory, otherwise everything is stored in the same trial run_dir directory and it's really messy. Change-Id: I06be2dd21710e14c1337d13b1fe6c2f68f037957 --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/osmo_bsc.py M src/osmo_gsm_tester/osmo_hlr.py M src/osmo_gsm_tester/osmo_mgcpgw.py M src/osmo_gsm_tester/osmo_msc.py M src/osmo_gsm_tester/osmo_nitb.py M src/osmo_gsm_tester/osmo_stp.py M src/osmo_gsm_tester/suite.py 9 files changed, 27 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/2915/3 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 7d12c85..585647a 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -51,7 +51,7 @@ self.suite_run.poll() self.log('Starting to connect to', self.bsc) - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoBtsTrx.BIN_BTS_TRX))) diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 30fff0e..eab0bdb 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -45,7 +45,7 @@ if self.bsc is None: raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started') log.log('Starting sysmoBTS to connect to', self.bsc) - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst(SysmoBts.BTS_SYSMO_BIN))) diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py index 5447118..efbda1f 100644 --- a/src/osmo_gsm_tester/osmo_bsc.py +++ b/src/osmo_gsm_tester/osmo_bsc.py @@ -39,7 +39,7 @@ def start(self): self.log('Starting osmo-bsc') - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() # NOTE: While OsmoMSC and OsmoBSC live in the same git repository, the diff --git a/src/osmo_gsm_tester/osmo_hlr.py b/src/osmo_gsm_tester/osmo_hlr.py index 110faa5..19241cc 100644 --- a/src/osmo_gsm_tester/osmo_hlr.py +++ b/src/osmo_gsm_tester/osmo_hlr.py @@ -39,7 +39,7 @@ def start(self): self.log('Starting osmo-hlr') - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-hlr'))) diff --git a/src/osmo_gsm_tester/osmo_mgcpgw.py b/src/osmo_gsm_tester/osmo_mgcpgw.py index b385274..db41dff 100644 --- a/src/osmo_gsm_tester/osmo_mgcpgw.py +++ b/src/osmo_gsm_tester/osmo_mgcpgw.py @@ -38,7 +38,7 @@ def start(self): self.log('Starting osmo-mgcpgw') - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) binary = inst.child('bin', 'osmo-bsc_mgcp') diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py index 24d8931..2c9b1e3 100644 --- a/src/osmo_gsm_tester/osmo_msc.py +++ b/src/osmo_gsm_tester/osmo_msc.py @@ -42,7 +42,7 @@ def start(self): self.log('Starting osmo-msc') - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-msc'))) binary = inst.child('bin', 'osmo-msc') diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 1830ced..3ef5276 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -41,7 +41,7 @@ def start(self): self.log('Starting osmo-nitb') - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-nitb'))) binary = inst.child('bin', 'osmo-nitb') diff --git a/src/osmo_gsm_tester/osmo_stp.py b/src/osmo_gsm_tester/osmo_stp.py index f1ad6fc..1aeb879 100644 --- a/src/osmo_gsm_tester/osmo_stp.py +++ b/src/osmo_gsm_tester/osmo_stp.py @@ -36,7 +36,7 @@ def start(self): self.log('Starting osmo-stp') - self.run_dir = util.Dir(self.suite_run.trial.get_run_dir().new_dir(self.name())) + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.configure() # NOTE: libosmo-sccp provides osmo-stp and is built as a dependency of diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 98ab4fe..71b8dc7 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -76,6 +76,8 @@ PASS = 'pass' FAIL = 'FAIL' + _run_dir = None + def __init__(self, suite_run, test_basename): self.basename = test_basename super().__init__(log.C_TST, self.basename) @@ -86,6 +88,11 @@ self.duration = 0 self.fail_type = None self.fail_message = None + + def get_run_dir(self): + if self._run_dir is None: + self._run_dir = util.Dir(self.suite_run.get_run_dir().new_dir(self._name)) + return self._run_dir def run(self): try: @@ -165,6 +172,7 @@ _resource_requirements = None _config = None _processes = None + _run_dir = None def __init__(self, trial, suite_scenario_str, suite_definition, scenarios=[]): super().__init__(log.C_TST, suite_scenario_str) @@ -209,6 +217,16 @@ config.combine(combination, c) return combination + def get_run_dir(self): + if self._run_dir is None: + self._run_dir = util.Dir(self.trial.get_run_dir().new_dir(self.name())) + return self._run_dir + + def get_test_run_dir(self): + if self.current_test: + return self.current_test.get_run_dir() + return self.get_run_dir() + def resource_requirements(self): if self._resource_requirements is None: self._resource_requirements = self.combined('resources') @@ -236,6 +254,7 @@ if names and not test.name() in names: test.set_skip() continue + self.current_test = test test.run() self.stop_processes() self.objects_cleanup() -- To view, visit https://gerrit.osmocom.org/2915 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I06be2dd21710e14c1337d13b1fe6c2f68f037957 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>