blob: 12f8c54bcecf215970e81ada5bb6a89791498f03 [file] [log] [blame]
mblighfa15d4e2010-03-24 21:50:59 +00001from autotest_lib.client.bin import test, utils
2from autotest_lib.client.common_lib import error
3import re
4
5class hwclock(test.test):
6 version = 1
7
8 def run_once(self, seconds=1):
9 utils.system('/sbin/hwclock --set --date "2/2/80 03:04:00"')
10 date = utils.system_output('/sbin/hwclock')
11 if not re.match('Sat *Feb *2 *03:04:.. 1980', date):
12 raise error.TestFail('Failed to set hwclock back to the eighties')
13
14
15 def cleanup(self):
16 utils.system('/sbin/hwclock --systohc --noadjfile --utc')