test/vhost: always print command output
In case of error the message is command output and is confusing: ERROR! While executing FIO jobs - RC: 1, Err message: hostname=VM-11-0xC0000000, be=0, 64-bit, os=Linux, arch=x86-64, fio=fio-2.2.10, flags=1 19:04:59 hostname=VM-10-0x30000000, be=0, 64-bit, os=Linux, arch=x86-64, fio=fio-2.2.10, flags=1 So change this to always print command output then error message. Change-Id: Iee4b25a00438c153a0d4d250ae43fc0d283faf33 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/383596 Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
d02bfbd3af
commit
fb0b17a19f
@ -74,11 +74,12 @@ def run_fio(vms, fio_cfg_fname, out_path, perf_vmex=False):
|
||||
# if for some reason output contains lines with "eta" - remove them
|
||||
out = re.sub(r'.+\[eta\s+\d{2}m:\d{2}s\]', '', out)
|
||||
|
||||
print(out)
|
||||
|
||||
if rc != 0:
|
||||
print("ERROR! While executing FIO jobs - RC: {rc}, Err message: {out}".format(rc=rc, out=out))
|
||||
print("ERROR! While executing FIO jobs - RC: {rc}".format(rc=rc, out=out))
|
||||
sys.exit(rc)
|
||||
else:
|
||||
print(out)
|
||||
save_file(os.path.join(out_path, ".".join([fio_cfg_prefix, "log"])), "w", out)
|
||||
|
||||
if perf_vmex:
|
||||
@ -170,7 +171,7 @@ def main():
|
||||
out = exec_cmd("./test/vhost/common/vm_ssh.sh {vm_num} sh -c 'echo {line} >> {cfg}'"
|
||||
.format(vm_num=i, line=line.strip(), cfg=fio_cfg_fname), blocking=True)
|
||||
if out[0] != 0:
|
||||
print("ERROR! While copying FIO job config file to VM {vm_num} - {vm_ip}"
|
||||
print("ERROR! While copying FIO job config file to VM {vm_num} - {vm_ip}\n"
|
||||
.format(vm_num=1, vm_ip=vm[0]))
|
||||
sys.exit(1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user