summaryrefslogtreecommitdiffstats
path: root/dovetail/test_runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'dovetail/test_runner.py')
-rw-r--r--dovetail/test_runner.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py
index a2bc774..95bed6f 100644
--- a/dovetail/test_runner.py
+++ b/dovetail/test_runner.py
@@ -106,7 +106,6 @@ class DockerRunner(object):
if cmds:
for cmd in cmds:
ret, msg = container.exec_cmd(cmd)
- self.testcase.cleaned(True)
if not dt_cfg.dovetail_config['noclean']:
container.clean()
@@ -229,18 +228,14 @@ class ShellRunner(object):
def run(self):
testcase_passed = 'PASS'
- prepare_failed = False
result = {'pass': 'PASS', 'results': []}
- if not self.testcase.prepared():
- cmds = self.testcase.pre_condition()
- for cmd in cmds:
- ret, msg = dt_utils.exec_cmd(cmd, self.logger)
- result['results'].append((cmd, ret, msg))
- if ret != 0:
- prepare_failed = True
- break
- if not prepare_failed:
- self.testcase.prepared(True)
+ cmds = self.testcase.pre_condition()
+ for cmd in cmds:
+ ret, msg = dt_utils.exec_cmd(cmd, self.logger)
+ result['results'].append((cmd, ret, msg))
+ if ret != 0:
+ self.logger.error('Failed to execute all pre_condition cmds.')
+ break
if not self.testcase.prepare_cmd(self.type):
self.logger.error(