3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

test-runner: add __str__ method to Process

Printing out processes was done manually but instead we can
make Process printing extendable by adding its own __str__
method. This now will print if the process is a multi-test
process as well.
This commit is contained in:
James Prestwood 2021-02-18 12:19:32 -08:00 committed by Denis Kenzior
parent c10bd14cde
commit 4682c22ece

View File

@ -310,6 +310,11 @@ class Process:
if waited > wait:
raise Exception("Timed out waiting for socket")
def __str__(self):
ret = str(self.args) + ' multi_test=%s' % str(self.multi_test)
ret += '\n'
return ret
class Interface:
def __init__(self, name, config):
self.name = name
@ -678,7 +683,7 @@ class Namespace:
ret = 'Namespace: %s\n' % self.name
ret += 'Processes:\n'
for p in self.processes:
ret += '\t%s\n' % str(p.args)
ret += '\t%s' % str(p)
ret += 'Radios:\n'
if len(self.radios) > 0: