mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +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:
parent
c10bd14cde
commit
4682c22ece
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user