test/iscsi: fix support for python 3.6 in calsoft.py

Value of output field in subprocess.CalledProcessError exception
should be converted from 'bytes' to 'str' before write() operation.

Change-Id: I010c9ddd75302294853b2bab3db1bf013660a465
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440081
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Tomasz Kulasek 2019-01-11 19:02:16 +01:00 committed by Darek Stojaczyk
parent 637e58ae2c
commit bf6210b3c7

View File

@ -40,7 +40,7 @@ def run_case(case, result_list, log_dir_path):
case_log = subprocess.check_output("{}/{}".format(CALSOFT_BIN_PATH, case), stderr=subprocess.STDOUT, shell=True).decode('utf-8')
except subprocess.CalledProcessError as e:
result_list.append({"Name": case, "Result": "FAIL"})
case_log = e.output
case_log = e.output.decode('utf-8')
else:
result_list.append({"Name": case, "Result": "PASS"})
with open(log_dir_path + case + '.txt', 'w') as f: