srs_andre has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17611 )


Change subject: srs_ue: adding modifier to pass arbitrary cmd line arguments
......................................................................

srs_ue: adding modifier to pass arbitrary cmd line arguments

Change-Id: Ie438c8aa9992dbc61b2133473a83d565cf5c7056
---
A example/scenarios/mod-srsue-args@.conf
M src/osmo_gsm_tester/resource.py
M src/osmo_gsm_tester/srs_ue.py
3 files changed, 12 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/11/17611/1

diff --git a/example/scenarios/mod-srsue-args@.conf 
b/example/scenarios/mod-srsue-args@.conf
new file mode 100644
index 0000000..ce7dcd9
--- /dev/null
+++ b/example/scenarios/mod-srsue-args@.conf
@@ -0,0 +1,9 @@
+modifiers:
+  enb:
+<%
+    modifier = "  - additional_args: "
+    for key in context.keys():
+      if 'param' in str(key):
+        modifier += context.get(key) + ' '
+    context.write(modifier)
+%>
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index bb44f39..c9e9a49 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -109,6 +109,7 @@
         'modem[].rf_dev_type': schema.STR,
         'modem[].rf_dev_args': schema.STR,
         'modem[].num_carriers': schema.STR,
+        'modem[].additional_args': schema.STR,
         'modem[].airplane_t_on_ms': schema.INT,
         'modem[].airplane_t_off_ms': schema.INT,
         'osmocon_phone[].serial_device': schema.STR,
diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py
index 2dc5ddf..6cd7c63 100644
--- a/src/osmo_gsm_tester/srs_ue.py
+++ b/src/osmo_gsm_tester/srs_ue.py
@@ -167,7 +167,8 @@
                 '--gw.netns=' + self.netns(),
                 '--log.filename=' + self.remote_log_file,
                 '--pcap.filename=' + self.remote_pcap_file,
-                '--general.metrics_csv_filename=' + self.remote_metrics_file)
+                '--general.metrics_csv_filename=' + self.remote_metrics_file,
+                self._conf.get('additional_args') if 
self._conf.get('additional_args') is not None else '')

         self.process = self.rem_host.RemoteProcess(srsUE.BINFILE, args)
         #self.process = 
self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsUE.BINFILE, remote_run_dir, args, 
remote_lib)

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17611
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ie438c8aa9992dbc61b2133473a83d565cf5c7056
Gerrit-Change-Number: 17611
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <an...@softwareradiosystems.com>
Gerrit-MessageType: newchange

Reply via email to