Commit 719ee8be authored by Vitaliy Mysak's avatar Vitaliy Mysak Committed by Darek Stojaczyk
Browse files

spdkcli/test: remove unnecessary test output

Don't print output of spdkcli command if not error happened.
Such logging only polutes the CI output.

On failed commands, the output is still printed.
Mismatch between `element_exist` and `element in child.before.decode()'
  also counts as fail so we show the output in that case too.

This commit is related to trello task:
https://trello.com/c/GlJnWmkR/150-spdkcli-improve-tests-output



Change-Id: I7b20dc2bbd1a3b15a3701be27bec023614e18621
Signed-off-by: default avatarVitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459305


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 294e8a2f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -15,14 +15,13 @@ def execute_command(cmd, element=None, element_exists=False):
    if ls_tree and element:
        child.sendline("ls %s" % ls_tree)
        child.expect("/>")
        print("child: %s" % child.before.decode())
        if element_exists:
            if element not in child.before.decode():
                print("Element %s not in list" % element)
                print("Element %s not in list:\n%s" % (element, child.before.decode()))
                exit(1)
        else:
            if element in child.before.decode():
                print("Element %s is in list" % element)
                print("Element %s is in list:\n%s" % (element, child.before.decode()))
                exit(1)