mbligh | f57411f | 2007-03-29 16:04:30 +0000 | [diff] [blame^] | 1 | import test |
| 2 | from autotest_utils import * |
| 3 | |
| 4 | # tests is a simple array of "cmd" "arguments" |
| 5 | tests = [["rmaptest", "-h -i100 -n100 -s100 -t100 -V10 -v file1.dat"], |
| 6 | ["rmaptest", "-l -i100 -n100 -s100 -t100 -V10 -v file2.dat"], |
| 7 | ["rmaptest", "-r -i100 -n100 -s100 -t100 -V10 -v file3.dat"], |
| 8 | ] |
| 9 | name = 0 |
| 10 | arglist = 1 |
| 11 | |
| 12 | class rmaptest(test.test): |
| 13 | version = 1 |
| 14 | preserve_srcdir = True |
| 15 | |
| 16 | def setup(self): |
| 17 | os.chdir(self.srcdir) |
| 18 | system('gcc -Wall -o rmaptest rmap-test.c') |
| 19 | |
| 20 | |
| 21 | def execute(self, args = ''): |
| 22 | os.chdir(self.tmpdir) |
| 23 | for test in tests: |
| 24 | cmd = self.srcdir + '/' + test[name] + ' ' \ |
| 25 | + args + ' ' + test[arglist] |
| 26 | system(cmd) |