suites/4g: Introduce sample handover test
This test currently only works with AmarisoftENB and srsUE, because:
* srsENB has no handover support yet
* AmarisoftUE doesn't provide any known way to verify handovers.
As a result, it usually runs with following filters and modifiers:
amarisoftenb-rftype@uhd+srsue-rftype@uhd+mod-enb-ncells@2+mod-enb-meas-enable
The get_counter() API may change in the future based on information
available from other implementations.
Change-Id: I0dff4af7e3a89804a03842ad4a4d697bca3a9773
diff --git a/src/osmo_gsm_tester/obj/ms.py b/src/osmo_gsm_tester/obj/ms.py
index 2774deb..e74377d 100644
--- a/src/osmo_gsm_tester/obj/ms.py
+++ b/src/osmo_gsm_tester/obj/ms.py
@@ -97,3 +97,6 @@
def msisdn(self):
return self.msisdn
+
+ def get_counter(self, counter_name):
+ raise log.Error('get_counter() not implemented!')
diff --git a/src/osmo_gsm_tester/obj/ms_srs.py b/src/osmo_gsm_tester/obj/ms_srs.py
index 106502d..cb29f06 100644
--- a/src/osmo_gsm_tester/obj/ms_srs.py
+++ b/src/osmo_gsm_tester/obj/ms_srs.py
@@ -327,6 +327,20 @@
proc.launch_sync()
return proc
+ def _get_counter_handover_success(self):
+ # Match against sample line: "HO success"
+ n = 0
+ stdout_lines = (self.process.get_stdout() or '').splitlines()
+ for l in stdout_lines:
+ if l == 'HO successful':
+ n += 1
+ return n
+
+ def get_counter(self, counter_name):
+ if counter_name == 'handover_success':
+ return self._get_counter_handover_success()
+ raise log.Error('counter %s not implemented!' % counter_name)
+
def verify_metric(self, value, operation='avg', metric='dl_brate', criterion='gt'):
# file is not properly flushed until the process has stopped.
if self.running():