summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/bts_octphy.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-11-28 12:15:10 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2017-12-05 11:09:10 +0000
commitd0a01117dfa5c0c0f9947c3f095e40f61fe6884d (patch)
tree4923bf1984f42985dcb492dd78533132f7a3a075 /src/osmo_gsm_tester/bts_octphy.py
parent4796b359bd2da1e40f55851aca7704ce058dd811 (diff)
bts_*: Add ready_for_pcu API
This is required to start osmo-pcu after osmo-bts is already setup and activated. Otherwise osmo-pcu ends after connecting to socket with: "pcu_l1_if.cpp:416 BTS not available" Change-Id: I7209589f60bda63094336e417638906be5e273c4
Diffstat (limited to 'src/osmo_gsm_tester/bts_octphy.py')
-rw-r--r--src/osmo_gsm_tester/bts_octphy.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py
index bc93a3a..d9ffd6e 100644
--- a/src/osmo_gsm_tester/bts_octphy.py
+++ b/src/osmo_gsm_tester/bts_octphy.py
@@ -32,6 +32,7 @@ class OsmoBtsOctphy(log.Origin):
values = None
lac = None
cellid = None
+ proc_bts = None
BIN_BTS_OCTPHY = 'osmo-bts-octphy'
@@ -83,10 +84,9 @@ class OsmoBtsOctphy(log.Origin):
self.log('Applying CAP_NET_RAW capability to', OsmoBtsOctphy.BIN_BTS_OCTPHY)
util.setcap_net_raw(btsoct_path, self.run_dir.new_dir('setcap_net_raw'))
- self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1',
+ self.proc_bts = self.launch_process(OsmoBtsOctphy.BIN_BTS_OCTPHY, '-r', '1',
'-c', os.path.abspath(self.config_file),
'-i', self.bsc.addr(), '-t', str(self.num_trx()))
- #self.launch_process(OsmoBtsOctphy.BIN_PCU, '-r', '1')
self.suite_run.poll()
def launch_process(self, binary_name, *args):
@@ -168,6 +168,11 @@ class OsmoBtsOctphy(log.Origin):
self.dbg(conf=values)
return values
+ 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_stderr() or '')
+
def set_bsc(self, bsc):
self.bsc = bsc