summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dovetail/test_runner.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/dovetail/test_runner.py b/dovetail/test_runner.py
index 603156fe..d6e910d3 100644
--- a/dovetail/test_runner.py
+++ b/dovetail/test_runner.py
@@ -82,17 +82,13 @@ class DockerRunner(object):
exist_file_name):
return
- if not self.testcase.prepared():
- prepare_failed = False
- cmds = self.testcase.pre_condition()
- if cmds:
- for cmd in cmds:
- ret, msg = Container.exec_cmd(container_id, cmd)
- if ret != 0:
- prepare_failed = True
- break
- if not prepare_failed:
- self.testcase.prepared(True)
+ cmds = self.testcase.pre_condition()
+ if cmds:
+ for cmd in cmds:
+ ret, msg = Container.exec_cmd(container_id, cmd)
+ if ret != 0:
+ self.logger.error("Failed to exec all pre_condition cmds.")
+ break
if not self.testcase.prepare_cmd(self.type):
self.logger.error(