OLD | NEW |
1 import os, re, logging | 1 import os, re, logging |
2 from autotest_lib.client.bin import test, utils, os_dep | 2 from autotest_lib.client.bin import test, utils, os_dep |
3 from autotest_lib.client.common_lib import error | 3 from autotest_lib.client.common_lib import error |
4 | 4 |
5 | 5 |
6 class qemu_iotests(test.test): | 6 class qemu_iotests(test.test): |
7 """ | 7 """ |
8 This autotest module runs the qemu_iotests testsuite. | 8 This autotest module runs the qemu_iotests testsuite. |
9 | 9 |
10 @copyright: Red Hat 2009 | 10 @copyright: Red Hat 2009 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 def setup(self, tarball='qemu-iotests.tar.bz2'): | 28 def setup(self, tarball='qemu-iotests.tar.bz2'): |
29 """ | 29 """ |
30 Uncompresses the tarball and cleans any leftover output files. | 30 Uncompresses the tarball and cleans any leftover output files. |
31 | 31 |
32 @param tarball: Relative path to the testsuite tarball. | 32 @param tarball: Relative path to the testsuite tarball. |
33 """ | 33 """ |
34 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 34 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
35 utils.extract_tarball_to_dir(tarball, self.srcdir) | 35 utils.extract_tarball_to_dir(tarball, self.srcdir) |
36 os.chdir(self.srcdir) | 36 os.chdir(self.srcdir) |
37 utils.make('clean') | 37 utils.system("make clean") |
38 | 38 |
39 | 39 |
40 def run_once(self, options='', testlist=''): | 40 def run_once(self, options='', testlist=''): |
41 """ | 41 """ |
42 Passes the appropriate parameters to the testsuite. | 42 Passes the appropriate parameters to the testsuite. |
43 | 43 |
44 # Usage: $0 [options] [testlist] | 44 # Usage: $0 [options] [testlist] |
45 # check options | 45 # check options |
46 # -raw test raw (default) | 46 # -raw test raw (default) |
47 # -cow test cow | 47 # -cow test cow |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 if failed_cases: | 90 if failed_cases: |
91 e_msg = ("Qemu-iotests failed. Failed cases: %s" % | 91 e_msg = ("Qemu-iotests failed. Failed cases: %s" % |
92 failed_cases) | 92 failed_cases) |
93 else: | 93 else: |
94 e_msg = "Qemu-iotests failed" | 94 e_msg = "Qemu-iotests failed" |
95 raise error.TestFail(e_msg) | 95 raise error.TestFail(e_msg) |
96 finally: | 96 finally: |
97 src = os.path.join(self.srcdir, "check.log") | 97 src = os.path.join(self.srcdir, "check.log") |
98 dest = os.path.join(self.resultsdir, "check.log") | 98 dest = os.path.join(self.resultsdir, "check.log") |
99 utils.get_file(src, dest) | 99 utils.get_file(src, dest) |
OLD | NEW |