Clean up the rmaptest and actually make it work
From: michal.k.k.piotrowski@gmail.com
git-svn-id: http://test.kernel.org/svn/autotest/trunk@514 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/rmaptest/rmaptest.py b/client/tests/rmaptest/rmaptest.py
new file mode 100644
index 0000000..9b745a6
--- /dev/null
+++ b/client/tests/rmaptest/rmaptest.py
@@ -0,0 +1,26 @@
+import test
+from autotest_utils import *
+
+# tests is a simple array of "cmd" "arguments"
+tests = [["rmaptest", "-h -i100 -n100 -s100 -t100 -V10 -v file1.dat"],
+ ["rmaptest", "-l -i100 -n100 -s100 -t100 -V10 -v file2.dat"],
+ ["rmaptest", "-r -i100 -n100 -s100 -t100 -V10 -v file3.dat"],
+ ]
+name = 0
+arglist = 1
+
+class rmaptest(test.test):
+ version = 1
+ preserve_srcdir = True
+
+ def setup(self):
+ os.chdir(self.srcdir)
+ system('gcc -Wall -o rmaptest rmap-test.c')
+
+
+ def execute(self, args = ''):
+ os.chdir(self.tmpdir)
+ for test in tests:
+ cmd = self.srcdir + '/' + test[name] + ' ' \
+ + args + ' ' + test[arglist]
+ system(cmd)