aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorAndre Puschmann <andre@softwareradiosystems.com>2020-08-24 18:17:35 +0200
committerAndre Puschmann <andre@softwareradiosystems.com>2020-08-27 15:37:54 +0200
commit58422c5e870ce8fe8c27be93d57f4401e4466dc2 (patch)
treeb4e94527b13058b060b14c722fcd20454fbf7616 /src/osmo_gsm_tester
parenta7b21a888bfaa8fe3477ae35920d93f93f09ccfb (diff)
enb_srs: add sleep after stopping srsENB to allow log flush
add similar concept used in the UE to allow the process to flush the logs Change-Id: I9f8341869f89cd7ae845072b9da4f6070fa2d242
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/obj/enb_srs.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/osmo_gsm_tester/obj/enb_srs.py b/src/osmo_gsm_tester/obj/enb_srs.py
index a945319..aa2ec87 100644
--- a/src/osmo_gsm_tester/obj/enb_srs.py
+++ b/src/osmo_gsm_tester/obj/enb_srs.py
@@ -21,6 +21,7 @@ import os
import pprint
from ..core import log, util, config, template, process, remote
+from ..core.event_loop import MainLoop
from . import enb
from . import rfemu
from .srslte_common import srslte_common
@@ -70,6 +71,7 @@ class srsENB(enb.eNodeB, srslte_common):
self.remote_pcap_file = None
self.enable_pcap = False
self.metrics_file = None
+ self.stop_sleep_time = 6 # We require at most 5s to stop
self.testenv = testenv
self._additional_args = []
if not rf_type_valid(conf.get('rf_dev_type', None)):
@@ -80,6 +82,10 @@ class srsENB(enb.eNodeB, srslte_common):
return
if self._run_node.is_local():
return
+
+ # Make sure we give the UE time to tear down
+ self.sleep_after_stop()
+
# copy back files (may not exist, for instance if there was an early error of process):
try:
self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file)
@@ -94,6 +100,12 @@ class srsENB(enb.eNodeB, srslte_common):
# Collect KPIs for each TC
self.testenv.test().set_kpis(self.get_kpis())
+ def sleep_after_stop(self):
+ # Only sleep once
+ if self.stop_sleep_time > 0:
+ MainLoop.sleep(self.stop_sleep_time)
+ self.stop_sleep_time = 0
+
def start(self, epc):
self.log('Starting srsENB')
self._epc = epc