commit 980e11b2bf8f82b60a8f5e9bd371ffff46f54bd4
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Wed Jun 6 15:02:59 2012 +0200
Do not stop command sequence execution if command failed
In case of a failed sequence command (even test that did not pass) the
whole rest of the command sequence was skipped. This could result in
hanging background process that would not be optionally killed at the
end of command sequence using type="kill" command. The fix is to let
the whole command sequence continue and save any failed command for
the overall command sequence result.
NetTest/NetTestController.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/NetTest/NetTestController.py b/NetTest/NetTestController.py
index 51a401f..8f46bcb 100644
--- a/NetTest/NetTestController.py
+++ b/NetTest/NetTestController.py
@@ -176,6 +176,7 @@ class NetTestController:
return cmd_res
def _run_command_sequence(self, sequence):
+ seq_passed = True
for command in sequence:
logging.info("Executing command: [%s]" % str_command(command))
cmd_res = self._run_command(command)
@@ -189,8 +190,8 @@ class NetTestController:
logging.error("Command failed - command: [%s], "
"Error message: \"%s\""
% (str_command(command), cmd_res["err_msg"]))
- return False
- return True
+ seq_passed = False
+ return seq_passed
def dump_recipe(self):
pprint(self._recipe)
Show replies by date