Add iozone test
From: Ying Tao <yingtao@cn.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@357 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/tests/iozone/control b/tests/iozone/control
new file mode 100644
index 0000000..c84b1b0
--- /dev/null
+++ b/tests/iozone/control
@@ -0,0 +1 @@
+job.runtest(None, 'iozone','/mnt')
diff --git a/tests/iozone/iozone.py b/tests/iozone/iozone.py
new file mode 100644
index 0000000..1f5f8bc
--- /dev/null
+++ b/tests/iozone/iozone.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+import test
+from autotest_utils import *
+
+class iozone(test.test):
+ version = 1
+
+ #http://www.iozone.org/src/current/iozone3_263.tar
+ def setup(self, tarball = 'iozone3_263.tar'):
+ tarball = unmap_url(self.bindir, tarball, self.tmpdir)
+ extract_tarball_to_dir(tarball, self.srcdir)
+ os.chdir(os.path.join(self.srcdir, 'src/current'))
+
+ arch = get_current_kernel_arch()
+ if (arch == 'ppc'):
+ system('make linux-powerpc')
+ elif (arch == 'ppc64'):
+ system('make linux-powerpc64')
+ elif (arch == 'x86_64'):
+ system('make linux-AMD64')
+ else:
+ system('make linux')
+
+ def execute(self, dir, args = None):
+ os.chdir(dir)
+ if not args:
+ args = '-a'
+ system('%s/src/current/iozone %s' % (self.srcdir, args))
+
+ # Do a profiling run if necessary
+ profilers = self.job.profilers
+ if profilers.present():
+ profilers.start(self)
+ system('%s/src/current/iozone %s' % (self.srcdir, args))
+ profilers.stop(self)
+ profilers.report(self)
diff --git a/tests/iozone/iozone3_263.tar b/tests/iozone/iozone3_263.tar
new file mode 100644
index 0000000..23e5069
--- /dev/null
+++ b/tests/iozone/iozone3_263.tar
Binary files differ