Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 8f916d7

Browse files
committed
Set parallel execution method as abstract
When we are not implementing a method, we need to set that method as abstract inside the concrete classes.
1 parent b179ecd commit 8f916d7

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

ltp/host.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.. moduleauthor:: Andrea Cervesato <[email protected]>
77
"""
88
import os
9+
import abc
910
import time
1011
import select
1112
import signal
@@ -221,6 +222,14 @@ def run_command(self,
221222

222223
return ret
223224

225+
@abc.abstractmethod
226+
def run_multiple_commands(
227+
self,
228+
commands: list,
229+
timeout: float = 3600,
230+
command_completed: callable = None) -> list:
231+
pass
232+
224233
def fetch_file(
225234
self,
226235
target_path: str,

ltp/qemu.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"""
88
import os
99
import re
10+
import abc
1011
import time
1112
import signal
1213
import select
@@ -568,6 +569,14 @@ def run_command(
568569

569570
return ret
570571

572+
@abc.abstractmethod
573+
def run_multiple_commands(
574+
self,
575+
commands: list,
576+
timeout: float = 3600,
577+
command_completed: callable = None) -> list:
578+
pass
579+
571580
def fetch_file(
572581
self,
573582
target_path: str,

ltp/ssh.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.. moduleauthor:: Andrea Cervesato <[email protected]>
77
"""
88
import os
9+
import abc
910
import time
1011
import select
1112
import socket
@@ -375,6 +376,14 @@ def run_command(
375376

376377
return ret
377378

379+
@abc.abstractmethod
380+
def run_multiple_commands(
381+
self,
382+
commands: list,
383+
timeout: float = 3600,
384+
command_completed: callable = None) -> list:
385+
pass
386+
378387
def fetch_file(
379388
self,
380389
target_path: str,

0 commit comments

Comments
 (0)