Improve exception report from execute_commands
- Add stdout and stderr to the exception message
- Use only "deploy_salt.xml" in swarm-bootstrap-salt-cluster-devops
for the job error message instead of completed stderr from pytest
Change-Id: I03afe97f371a49b943523534dd815ba989dc7c6a
diff --git a/tcp_tests/managers/execute_commands.py b/tcp_tests/managers/execute_commands.py
index 193153c..e9b7d12 100644
--- a/tcp_tests/managers/execute_commands.py
+++ b/tcp_tests/managers/execute_commands.py
@@ -132,8 +132,14 @@
if x == 1 and skip_fail is False:
# In the last retry iteration, raise an exception
- raise Exception("Step '{0}' failed"
- .format(description))
+ raise Exception("Step '{0}' failed:\n"
+ "=======================================\n"
+ "STDOUT: {1}\n"
+ "=======================================\n"
+ "STDERR: {2}\n"
+ .format(description,
+ result.stdout_str,
+ result.stderr_str))
def command2(self, step, msg):
# Required fields