OLD | NEW |
1 import os | 1 import os |
2 from autotest_lib.client.bin import test, utils, kernel | 2 from autotest_lib.client.bin import test, utils, kernel |
3 | 3 |
4 | 4 |
5 class sparse(test.test): | 5 class sparse(test.test): |
6 version = 1 | 6 version = 1 |
7 | 7 |
8 def initialize(self): | 8 def initialize(self): |
9 self.job.require_gcc() | 9 self.job.require_gcc() |
10 | 10 |
11 | 11 |
12 # http://www.codemonkey.org.uk/projects/git-snapshots/sparse/sparse-2006-04-
28.tar.gz | 12 # http://www.codemonkey.org.uk/projects/git-snapshots/sparse/sparse-2006-04-
28.tar.gz |
13 def setup(self, tarball = 'sparse-2006-04-28.tar.gz'): | 13 def setup(self, tarball = 'sparse-2006-04-28.tar.gz'): |
14 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 14 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
15 utils.extract_tarball_to_dir(tarball, self.srcdir) | 15 utils.extract_tarball_to_dir(tarball, self.srcdir) |
16 os.chdir(self.srcdir) | 16 os.chdir(self.srcdir) |
17 | 17 |
18 utils.make() | 18 utils.system('make') |
19 utils.system('ln check sparse') | 19 utils.system('ln check sparse') |
20 | 20 |
21 self.top_dir = self.job.tmpdir+'/sparse' | 21 self.top_dir = self.job.tmpdir+'/sparse' |
22 | 22 |
23 | 23 |
24 def execute(self, base_tree, patches, config, config_list = None): | 24 def execute(self, base_tree, patches, config, config_list = None): |
25 kernel = self.job.kernel(base_tree, self.resultsdir) | 25 kernel = self.job.kernel(base_tree, self.resultsdir) |
26 kernel.patch(patches) | 26 kernel.patch(patches) |
27 kernel.config(config, config_list) | 27 kernel.config(config, config_list) |
28 | 28 |
29 os.environ['PATH'] = self.srcdir + ':' + os.environ['PATH'] | 29 os.environ['PATH'] = self.srcdir + ':' + os.environ['PATH'] |
30 results = os.path.join (self.resultsdir, 'sparse') | 30 results = os.path.join (self.resultsdir, 'sparse') |
31 kernel.build(make_opts = 'C=1', logfile = results) | 31 kernel.build(make_opts = 'C=1', logfile = results) |
OLD | NEW |