OLD | NEW |
1 import re, os | 1 import re, os |
2 from autotest_lib.client.bin import utils, test | 2 from autotest_lib.client.bin import utils, test |
3 from autotest_lib.client.common_lib import error | 3 from autotest_lib.client.common_lib import error |
4 | 4 |
5 class libhugetlbfs(test.test): | 5 class libhugetlbfs(test.test): |
6 version = 6 | 6 version = 6 |
7 | 7 |
8 def initialize(self, dir = None, pages_requested = 20): | 8 def initialize(self, dir = None, pages_requested = 20): |
9 self.dir = None | 9 self.dir = None |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 # http://libhugetlbfs.ozlabs.org/releases/libhugetlbfs-2.0.tar.gz | 37 # http://libhugetlbfs.ozlabs.org/releases/libhugetlbfs-2.0.tar.gz |
38 def setup(self, tarball = 'libhugetlbfs-2.0.tar.gz'): | 38 def setup(self, tarball = 'libhugetlbfs-2.0.tar.gz'): |
39 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 39 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
40 utils.extract_tarball_to_dir(tarball, self.srcdir) | 40 utils.extract_tarball_to_dir(tarball, self.srcdir) |
41 os.chdir(self.srcdir) | 41 os.chdir(self.srcdir) |
42 | 42 |
43 utils.system('patch -p1 < ../elflink.patch') | 43 utils.system('patch -p1 < ../elflink.patch') |
44 # make might fail if there are no proper headers for the 32 bit | 44 # make might fail if there are no proper headers for the 32 bit |
45 # version, in that case try only for the 64 bit version | 45 # version, in that case try only for the 64 bit version |
46 try: | 46 try: |
47 utils.make() | 47 utils.system('make') |
48 except: | 48 except: |
49 utils.make('OBJDIRS=obj64') | 49 utils.system('make OBJDIRS=obj64') |
50 | 50 |
51 | 51 |
52 def run_once(self): | 52 def run_once(self): |
53 os.chdir(self.srcdir) | 53 os.chdir(self.srcdir) |
54 # make check might fail for 32 bit if the 32 bit compile earlier | 54 # make check might fail for 32 bit if the 32 bit compile earlier |
55 # had failed. See if it passes for 64 bit in that case. | 55 # had failed. See if it passes for 64 bit in that case. |
56 try: | 56 try: |
57 utils.make('check') | 57 utils.system('make check') |
58 except: | 58 except: |
59 utils.make('check OBJDIRS=obj64') | 59 utils.system('make check OBJDIRS=obj64') |
60 | 60 |
61 | 61 |
62 def cleanup(self): | 62 def cleanup(self): |
63 if self.dir: | 63 if self.dir: |
64 utils.system('umount %s' % self.dir) | 64 utils.system('umount %s' % self.dir) |
OLD | NEW |