1import os 2from autotest_lib.client.bin import test, utils 3 4 5# tests is a simple array of "cmd" "arguments" 6tests = [["rmaptest", "-h -i100 -n100 -s100 -t100 -V10 -v file1.dat"], 7 ["rmaptest", "-l -i100 -n100 -s100 -t100 -V10 -v file2.dat"], 8 ["rmaptest", "-r -i100 -n100 -s100 -t100 -V10 -v file3.dat"], 9 ] 10name = 0 11arglist = 1 12 13class rmaptest(test.test): 14 version = 1 15 preserve_srcdir = True 16 17 def initialize(self): 18 self.job.require_gcc() 19 20 21 def setup(self): 22 os.chdir(self.srcdir) 23 utils.system(utils.get_cc() + ' -Wall -o rmaptest rmap-test.c') 24 25 26 def execute(self, args = ''): 27 os.chdir(self.tmpdir) 28 for test in tests: 29 cmd = '%s/%s %s %s' % (self.srcdir, test[name], args, test[arglist]) 30 utils.system(cmd) 31