summaryrefslogtreecommitdiff
path: root/client/tests/rmaptest/rmaptest.py
blob: f4cf3af15404da1bfa0afd44d8948e5526a89dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
from autotest_lib.client.bin import test
from autotest_lib.client.common_lib import utils


# 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)
		utils.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]
			utils.system(cmd)