test/fio: update the path of fio binary

Get the path of fio binary dynamically.

Change-Id: Ieb29bdfec33716828339a60e67dfe786e8ad278a
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/423057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Chen Wang 2018-08-22 15:47:55 +08:00 committed by Jim Harris
parent 6058327b10
commit d5d199cfa7
2 changed files with 12 additions and 2 deletions

View File

@ -65,7 +65,12 @@ def main():
print("Found devices: ", devices)
configure_devices(devices)
fio_executable = '/usr/bin/fio'
try:
fio_executable = check_output("which --skip-alias fio", shell=True).split()[0]
except subprocess.CalledProcessError as e:
print(e)
print("Can't find the fio binary, please install it.")
sys.exit(1)
device_paths = ['/dev/' + dev for dev in devices]
sys.stdout.flush()

View File

@ -65,7 +65,12 @@ def main():
print "Found devices: ", devices
# configure_devices(devices)
fio_executable = '/usr/bin/fio'
try:
fio_executable = check_output("which --skip-alias fio", shell=True).split()[0]
except subprocess.CalledProcessError as e:
print(e)
print("Can't find the fio binary, please install it.")
sys.exit(1)
device_paths = ['/dev/' + dev for dev in devices]
print device_paths