@@ -134,7 +134,9 @@ def stop(self, timeout: float = 30, iobuffer: IOBuffer = None) -> None:
134
134
"""
135
135
raise NotImplementedError ()
136
136
137
- def force_stop (self , timeout : float = 30 , iobuffer : IOBuffer = None ) -> None :
137
+ def force_stop (self ,
138
+ timeout : float = 30 ,
139
+ iobuffer : IOBuffer = None ) -> None :
138
140
"""
139
141
Force stopping the current SUT session.
140
142
:param timeout: timeout to complete in seconds
@@ -151,6 +153,7 @@ def run_command(self,
151
153
"""
152
154
Run command on target.
153
155
:param command: command to execute
156
+ :type command: str
154
157
:param timeout: timeout before stopping execution. Default is 3600
155
158
:type timeout: float
156
159
:param iobuffer: buffer used to write SUT stdout
@@ -169,6 +172,39 @@ def run_command(self,
169
172
"""
170
173
raise NotImplementedError ()
171
174
175
+ def run_multiple_commands (self ,
176
+ commands : list ,
177
+ timeout : float = 3600 ,
178
+ command_completed : callable = None ) -> list :
179
+ """
180
+ Run multiple commands in parallel on target.
181
+ :param commands: commands to execute
182
+ :type commands: list(str)
183
+ :param timeout: timeout before stopping execution. Default is 3600
184
+ :type timeout: float
185
+ :param command_completed: function called when a test has completed.
186
+ Its definition is `command_completed(ret: set)` where ret has the
187
+ same definition of data returned by `run_multiple_commands` inside
188
+ the list.
189
+ :type command_completed: callable
190
+ :returns: list of (dict, Exception) containing command execution
191
+ information and exception.
192
+
193
+ [
194
+ ({
195
+ "command": <str>,
196
+ "timeout": <float>,
197
+ "returncode": <int>,
198
+ "stdout": <str>,
199
+ "exec_time": <float>,
200
+ }, None)
201
+ ...
202
+ ]
203
+
204
+ If None is returned, then callback failed.
205
+ """
206
+ raise NotImplementedError ()
207
+
172
208
def fetch_file (
173
209
self ,
174
210
target_path : str ,
0 commit comments