aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher/actions/test
diff options
context:
space:
mode:
authorRĂ©mi Duraffort <remi.duraffort@linaro.org>2018-04-03 11:03:38 +0200
committerNeil Williams <neil.williams@linaro.org>2018-04-25 09:31:22 +0100
commit2e84699d8e5c28f33c81fc102eb72f8b2cd3aecb (patch)
treea20b38486c8b8fd27330241299579c5d2f13a8ee /lava_dispatcher/actions/test
parente3b0974709cde794a279280b6287ce82f9080ac2 (diff)
Port classes to python3 only
Change-Id: I8bc55876f82817533dfef42128aefea15c904311
Diffstat (limited to 'lava_dispatcher/actions/test')
-rw-r--r--lava_dispatcher/actions/test/monitor.py6
-rw-r--r--lava_dispatcher/actions/test/multinode.py12
-rw-r--r--lava_dispatcher/actions/test/shell.py10
3 files changed, 14 insertions, 14 deletions
diff --git a/lava_dispatcher/actions/test/monitor.py b/lava_dispatcher/actions/test/monitor.py
index d04f58304..048afd456 100644
--- a/lava_dispatcher/actions/test/monitor.py
+++ b/lava_dispatcher/actions/test/monitor.py
@@ -41,7 +41,7 @@ class TestMonitor(LavaTest):
LavaTestMonitor Strategy object
"""
def __init__(self, parent, parameters):
- super(TestMonitor, self).__init__(parent)
+ super().__init__(parent)
self.action = TestMonitorRetry()
self.action.job = self.job
self.action.section = self.action_type
@@ -96,14 +96,14 @@ class TestMonitorAction(TestAction): # pylint: disable=too-many-instance-attrib
summary = "Lava Test Monitor"
def __init__(self):
- super(TestMonitorAction, self).__init__()
+ super().__init__()
self.test_suite_name = None
self.report = {}
self.fixupdict = {}
self.patterns = {}
def run(self, connection, max_end_time, args=None):
- connection = super(TestMonitorAction, self).run(connection, max_end_time, args)
+ connection = super().run(connection, max_end_time, args)
if not connection:
raise InfrastructureError("Connection closed")
diff --git a/lava_dispatcher/actions/test/multinode.py b/lava_dispatcher/actions/test/multinode.py
index 4efae9bb8..df1a6feb7 100644
--- a/lava_dispatcher/actions/test/multinode.py
+++ b/lava_dispatcher/actions/test/multinode.py
@@ -37,7 +37,7 @@ class MultinodeTestShell(LavaTest):
priority = 2
def __init__(self, parent, parameters):
- super(MultinodeTestShell, self).__init__(parent)
+ super().__init__(parent)
self.action = MultinodeTestAction()
self.action.job = self.job
self.action.section = self.action_type
@@ -75,13 +75,13 @@ class MultinodeTestAction(TestShellAction):
summary = "Multinode Lava Test Shell"
def __init__(self):
- super(MultinodeTestAction, self).__init__()
+ super().__init__()
self.multinode_dict = {
'multinode': r'<LAVA_MULTI_NODE> <LAVA_(\S+) ([^>]+)>',
}
def validate(self):
- super(MultinodeTestAction, self).validate()
+ super().validate()
# MultinodeProtocol is required, others can be optional
if MultinodeProtocol.name not in [protocol.name for protocol in self.job.protocols]:
self.errors = "Invalid job - missing protocol"
@@ -94,7 +94,7 @@ class MultinodeTestAction(TestShellAction):
self.signal_director.setup(self.parameters)
def _reset_patterns(self):
- super(MultinodeTestAction, self)._reset_patterns()
+ super()._reset_patterns()
self.patterns.update(self.multinode_dict)
def populate(self, parameters):
@@ -108,7 +108,7 @@ class MultinodeTestAction(TestShellAction):
"""
Calls the parent check_patterns first, then checks for subclass pattern.
"""
- ret = super(MultinodeTestAction, self).check_patterns(event, test_connection, check_char)
+ ret = super().check_patterns(event, test_connection, check_char)
if event == 'multinode':
name, params = test_connection.match.groups()
self.logger.debug("Received Multi_Node API <LAVA_%s>" % name)
@@ -135,7 +135,7 @@ class MultinodeTestAction(TestShellAction):
class SignalDirector(TestShellAction.SignalDirector):
def __init__(self, protocol):
- super(MultinodeTestAction.SignalDirector, self).__init__(protocol)
+ super().__init__(protocol)
self.base_message = {}
def setup(self, parameters):
diff --git a/lava_dispatcher/actions/test/shell.py b/lava_dispatcher/actions/test/shell.py
index 050cce5d1..7fb6795f4 100644
--- a/lava_dispatcher/actions/test/shell.py
+++ b/lava_dispatcher/actions/test/shell.py
@@ -59,7 +59,7 @@ class TestShell(LavaTest):
LavaTestShell Strategy object
"""
def __init__(self, parent, parameters):
- super(TestShell, self).__init__(parent)
+ super().__init__(parent)
self.action = TestShellRetry()
self.action.job = self.job
self.action.section = self.action_type
@@ -104,7 +104,7 @@ class PatternFixup(object):
Avoid calling from validate() or populate() - this needs the
RepoAction to be running.
"""
- super(PatternFixup, self).__init__()
+ super().__init__()
self.pat = DEFAULT_V1_PATTERN
self.fixup = DEFAULT_V1_FIXUP
if isinstance(testdef, dict) and 'metadata' in testdef:
@@ -155,7 +155,7 @@ class TestShellAction(TestAction):
summary = "Lava Test Shell"
def __init__(self):
- super(TestShellAction, self).__init__()
+ super().__init__()
self.signal_director = self.SignalDirector(None) # no default protocol
self.patterns = {}
self.signal_match = SignalMatch()
@@ -186,13 +186,13 @@ class TestShellAction(TestAction):
if "repository" not in testdef:
self.errors = "Repository missing from test definition"
self._reset_patterns()
- super(TestShellAction, self).validate()
+ super().validate()
def run(self, connection, max_end_time, args=None): # pylint: disable=too-many-locals
"""
Common run function for subclasses which define custom patterns
"""
- super(TestShellAction, self).run(connection, max_end_time, args)
+ super().run(connection, max_end_time, args)
# Get the connection, specific to this namespace
connection_namespace = self.parameters.get('connection-namespace', None)