test/spdkcli: Include errors from a failed command
Dump it to stdin to make the debugging easier. Change-Id: I9b13d0a77e45aa84ec2a55b7b982225592f2566d Signed-off-by: Michal Berger <michal.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17560 Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
f714562f5a
commit
5ff8838dda
@ -14,7 +14,7 @@ def execute_command(cmd, element=None, element_exists=False):
|
||||
child.sendline(cmd)
|
||||
child.expect("/>")
|
||||
if "error response" in child.before.decode():
|
||||
print("Error in cmd: %s" % cmd)
|
||||
print("Error in cmd: %s (%s)" % (cmd, child.before.decode()))
|
||||
exit(1)
|
||||
ls_tree = cmd.split(" ")[0]
|
||||
if ls_tree and element:
|
||||
|
Loading…
Reference in New Issue
Block a user