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