summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil.kumaran@linaro.org>2013-07-26 14:59:19 +0530
committerSenthil Kumaran <senthil.kumaran@linaro.org>2013-07-26 14:59:19 +0530
commit741286d2d49195934e7aefd54df09ff5c19de966 (patch)
treee0e081113e9f42e10508242270da36976d105ceb /android
parent8e6d9460a50a802d668717d5bb423ff88e42a0af (diff)
Add iozone test definition for android.
Diffstat (limited to 'android')
-rw-r--r--android/iozone.yaml11
-rwxr-xr-xandroid/scripts/iozone/iozone.sh40
-rwxr-xr-xandroid/scripts/iozone/iozoneparser.sh47
3 files changed, 98 insertions, 0 deletions
diff --git a/android/iozone.yaml b/android/iozone.yaml
new file mode 100644
index 0000000..22ff087
--- /dev/null
+++ b/android/iozone.yaml
@@ -0,0 +1,11 @@
+metadata:
+ format: "Lava-Test Test Definition 1.0"
+ name: iozone
+ description: "iozone test for android."
+
+run:
+ steps:
+ - "./android/scripts/iozone/iozone.sh"
+
+parse:
+ pattern: "^(?P<test_case_id>\\w+)\\s+(?P<measurement>\\d+)\\s+(?P<units>\\S+)\\s+(?P<result>\\w+)$"
diff --git a/android/scripts/iozone/iozone.sh b/android/scripts/iozone/iozone.sh
new file mode 100755
index 0000000..287df09
--- /dev/null
+++ b/android/scripts/iozone/iozone.sh
@@ -0,0 +1,40 @@
+#!/system/bin/sh
+#
+# iozone test
+#
+# Copyright (C) 2013, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# owner: harigopal.gollamudi@linaro.org
+#
+##############################################################################
+
+# $1 is the testing location. The -b must be specified for parser.
+# the file itself does not matter as it is not used.
+# The -b cause results reports to be printed to stdout.
+
+#uncomment the following and add cross compiled iozone to this directory.
+#mount -o remount,rw /
+#iozone_cmd=$1"/iozone -a -i 0 -i 2 -s 16m -V teststring -b iozone_results"
+
+# The original command with a -b gives excel results which are printed to
+# stdout and can be parsed
+
+iozone_cmd="iozone -a -i 0 -i 2 -s 16m -V teststring "
+${iozone_cmd} &> stdout.log
+sh $PWD/android/scripts/iozone/iozoneparser.sh
+rm -rf stdout.log
diff --git a/android/scripts/iozone/iozoneparser.sh b/android/scripts/iozone/iozoneparser.sh
new file mode 100755
index 0000000..74816ff
--- /dev/null
+++ b/android/scripts/iozone/iozoneparser.sh
@@ -0,0 +1,47 @@
+#!/system/bin/sh
+#
+# iozoneparser
+#
+# Copyright (C) 2013, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# owner: harigopal.gollamudi@linaro.org
+#
+##############################################################################
+
+grep -A 13 "KB reclen write rewrite" stdout.log | sed '1d' > temp.log
+while read line
+do
+ var="$(echo $line | cut -d' ' -f2)"
+
+ Write_val="$(echo $line | cut -d' ' -f3)"
+ ReWrite_val="$(echo $line | cut -d' ' -f4)"
+ RandomRead_val="$(echo $line | cut -d' ' -f5)"
+ RandomWrite_val="$(echo $line | cut -d' ' -f6)"
+
+ Write_string='iozone_Write_KB_16384_rclen'_$var' '$Write_val' 'Kbytes/sec' 'pas
+ RandomRead_string='iozone_Random_read_KB_16384_rclen'_$var' '$RandomRead_val' Kbytes/sec' 'pass
+ RandomWrite_string='iozone_Random_write_KB_16384_rclen'_$var' '$RandomWrite_va' 'Kbytes/sec' 'pass
+ ReWrite_string='iozone_Rewrite_KB_16384_rclen'_$var' '$ReWrite_val' 'Kbytes/se' 'pass
+
+ echo $Write_string
+ echo $RandomRead_string
+ echo $RandomWrite_string
+ echo $ReWrite_string
+
+done < temp.log
+rm -rf temp.log