OLD | NEW |
1 import os | 1 import os |
2 from autotest_lib.client.bin import test, utils | 2 from autotest_lib.client.bin import test, utils |
3 from autotest_lib.client.common_lib import error | 3 from autotest_lib.client.common_lib import error |
4 | 4 |
5 class rtc(test.test): | 5 class rtc(test.test): |
6 version = 1 | 6 version = 1 |
7 preserve_srcdir = True | 7 preserve_srcdir = True |
8 | 8 |
9 def setup(self): | 9 def setup(self): |
10 os.chdir(self.srcdir) | 10 os.chdir(self.srcdir) |
11 utils.make('clobber') | 11 utils.system('make clobber') |
12 utils.make() | 12 utils.system('make') |
13 | 13 |
14 | 14 |
15 def initialize(self): | 15 def initialize(self): |
16 self.job.require_gcc() | 16 self.job.require_gcc() |
17 | 17 |
18 | 18 |
19 def run_once(self, def_rtc="/dev/rtc0", maxfreq=64): | 19 def run_once(self, def_rtc="/dev/rtc0", maxfreq=64): |
20 if not os.path.exists(def_rtc): | 20 if not os.path.exists(def_rtc): |
21 raise error.TestNAError("RTC device %s does not exist" % def_rtc) | 21 raise error.TestNAError("RTC device %s does not exist" % def_rtc) |
22 os.chdir(self.srcdir) | 22 os.chdir(self.srcdir) |
23 utils.system('./rtctest %s %s' % (def_rtc, maxfreq)) | 23 utils.system('./rtctest %s %s' % (def_rtc, maxfreq)) |
OLD | NEW |