epc: refactor run_wait() method and rename to prepare_proc()
this refactor no longer enforces blocking operation of the process.
Instead it returns the process object to the caller who
can now run either proc.launch() for non-blocking operation
or proc.launch_sync() for blocking mode.
The non-block mode allos doing other stuff in the background,
for example controlling the rfemu while running a ping.
Change-Id: Ia6372e55a8829f722e40db537d9dfd63a94d1be9
diff --git a/src/osmo_gsm_tester/obj/epc.py b/src/osmo_gsm_tester/obj/epc.py
index dfeba74..6f056fc 100644
--- a/src/osmo_gsm_tester/obj/epc.py
+++ b/src/osmo_gsm_tester/obj/epc.py
@@ -76,13 +76,14 @@
return epc_class(testenv, run_node)
- def run_wait(self, name, popen_args):
- ''' Execute process on EPC node, useful for MT traffic '''
+ def prepare_process(self, name, popen_args):
+ ''' Prepare and return a process to run on EPC node.
+ Caller calls either launch() or launch_sync()
+ for non-blocking or blocking operation respectively '''
if self._run_node.is_local():
proc = process.Process(name, self.run_dir, popen_args)
else:
proc = self.rem_host.RemoteProcess(name, popen_args)
- proc.launch_sync()
return proc
###################