summaryrefslogtreecommitdiff
path: root/ubuntu/scripts/fio-test.py
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2015-02-09 12:11:41 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-02-26 09:20:20 +0000
commit450cb6ed9d9d6d615f9a828e73e66658cddb1b5a (patch)
tree0d02fb7faf04cc8bc7f3f2f74b9274487848763d /ubuntu/scripts/fio-test.py
parent502e9259edabcedcdce5d29448c77ed0bfaac54f (diff)
fix PEP8 issues in python scripts
Change-Id: I4635323eb8fb2ed852ca5e4ab3cbedf866e1269a
Diffstat (limited to 'ubuntu/scripts/fio-test.py')
-rwxr-xr-xubuntu/scripts/fio-test.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ubuntu/scripts/fio-test.py b/ubuntu/scripts/fio-test.py
index c64797e..d8df998 100755
--- a/ubuntu/scripts/fio-test.py
+++ b/ubuntu/scripts/fio-test.py
@@ -34,6 +34,7 @@ print os.getcwd()
commands.getstatusoutput("sudo fdisk -l > partition_layout.txt 2>&1")
device_name = sys.argv[1]
+
def fio_device_existence():
testcase_name = "fio_target_device_existence"
if sys.argv[1] == "":
@@ -54,6 +55,7 @@ def fio_device_existence():
print testcase_name + ": FAIL" + " 0" + " Inapplicable" + " - Could not locate " + sys.argv[1] + " on target board"
sys.exit(1)
+
def fio_existence():
testcase_name = "fio_binary_existence"
run_command = "which fio"
@@ -67,6 +69,7 @@ def fio_existence():
print "The FIO binary location is: " + fio_binary_location[1]
print testcase_name + ": PASS" + " 0" + " Inapplicable"
+
def fio_read():
testcase_name = "fio_bs4kread_iops"
run_command = "sudo fio -filename=" + device_name + " -rw=read -direct=1 -iodepth 1 -thread -ioengine=psync -bs=4k -numjobs=1 -runtime=10 -group_reporting -name=fio_read > fio_read.txt 2>&1"
@@ -97,6 +100,7 @@ def fio_read():
logfile.close()
print testcase_name + ": PASS" + " " + iops_result + " " + "IOPS"
+
def fio_randread():
testcase_name = "fio_randread_iops"
run_command = "sudo fio -filename=" + device_name + " -rw=randread -direct=1 -iodepth 1 -thread -ioengine=psync -bs=4k -numjobs=1 -runtime=10 -group_reporting -name=fio_randread > fio_randread.txt 2>&1"
@@ -127,6 +131,7 @@ def fio_randread():
logfile.close()
print testcase_name + ": PASS" + " " + iops_result + " " + "IOPS"
+
def fio_write():
testcase_name = "fio_write_iops"
run_command = "sudo fio -filename=" + device_name + " -rw=write -direct=1 -iodepth 1 -thread -ioengine=psync -bs=4k -numjobs=1 -runtime=10 -group_reporting -name=fio_write > fio_write.txt 2>&1"
@@ -157,6 +162,7 @@ def fio_write():
logfile.close()
print testcase_name + ": PASS" + " " + iops_result + " " + "IOPS"
+
def fio_randwrite():
testcase_name = "fio_randwrite_iops"
run_command = "sudo fio -filename=" + device_name + " -rw=randwrite -direct=1 -iodepth 1 -thread -ioengine=psync -bs=4k -numjobs=1 -runtime=10 -group_reporting -name=fio_randwrite > fio_randwrite.txt 2>&1"
@@ -187,6 +193,7 @@ def fio_randwrite():
logfile.close()
print testcase_name + ": PASS" + " " + iops_result + " " + "IOPS"
+
def fio_512k_write():
testcase_name = "fio_512k_write_bandwidth"
run_command = "sudo fio -filename=" + device_name + " -rw=write -direct=1 -iodepth 1 -thread -ioengine=psync -bs=512k -numjobs=1 -runtime=10 -group_reporting -name=fio_512k_write > fio_512k_write.txt 2>&1"
@@ -218,6 +225,7 @@ def fio_512k_write():
logfile.close()
print testcase_name + ": PASS" + " " + bandwidth_number + " " + "KB/s"
+
def fio_512k_read():
testcase_name = "fio_512k_read_bandwidth"
run_command = "sudo fio -filename=" + device_name + " -rw=read -direct=1 -iodepth 1 -thread -ioengine=psync -bs=512k -numjobs=1 -runtime=10 -group_reporting -name=fio_512k_read > fio_512k_read.txt 2>&1"
@@ -257,4 +265,4 @@ fio_randread()
fio_write()
fio_randwrite()
fio_512k_write()
-fio_512k_read() \ No newline at end of file
+fio_512k_read()