aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/bts_sysmo.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-02 13:08:02 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-02 14:52:53 +0200
commit302c7563efa301829d9b695e77dad0859e629885 (patch)
treea4064fd694cb63d1e0018a37a9d6cc2301cc9ed8 /src/osmo_gsm_tester/bts_sysmo.py
parenta9006dffd951f17e945f9aff42e66db7cae8087a (diff)
osmotrx: Make sure remote process stops after ssh session is closed
First of all, it was found that vty allocation must be forced (-t -t) during ssh session creation to make sure SIGHUP is forwarded when session is closed. Second, since osmo-trx ignores SIGHUP (osmo_init_ignore_signals()), we must add a wrapper script which converts received SIGHUP into a SIGINT to stop osmo-trx. Change-Id: Ic334a54b1a1827d74fe0b453ac32bb77b8616147
Diffstat (limited to 'src/osmo_gsm_tester/bts_sysmo.py')
-rw-r--r--src/osmo_gsm_tester/bts_sysmo.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py
index bdf6bb7..66d305a 100644
--- a/src/osmo_gsm_tester/bts_sysmo.py
+++ b/src/osmo_gsm_tester/bts_sysmo.py
@@ -90,6 +90,12 @@ class SysmoBts(bts_osmo.OsmoBts):
###################
# PUBLIC (test API included)
###################
+ # We get log from ssh stdout instead of usual stderr.
+ def ready_for_pcu(self):
+ if not self.proc_bts or not self.proc_bts.is_running:
+ return False
+ return 'BTS is up' in (self.proc_bts.get_stdout() or '')
+
def start(self, keepalive=False):
if self.bsc is None:
raise RuntimeError('BTS needs to be added to a BSC or NITB before it can be started')