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
This commit is contained in:
parent
e66e3aebb4
commit
b0ebcbcf10
|
@ -76,13 +76,14 @@ class EPC(log.Origin, metaclass=ABCMeta):
|
|||
|
||||
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
|
||||
|
||||
###################
|
||||
|
|
|
@ -27,7 +27,8 @@ print('UE is RRC idle')
|
|||
sleep(5)
|
||||
|
||||
# Generate MO traffic, send single ping
|
||||
proc = epc.run_wait('ping', ('ping', '-c', '1', ue.get_assigned_addr()))
|
||||
proc = epc.prepare_process('ping', ('ping', '-c', '1', ue.get_assigned_addr()))
|
||||
proc.launch_sync()
|
||||
output = proc.get_stdout()
|
||||
|
||||
# Check paging received
|
||||
|
|
Loading…
Reference in New Issue