diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/rtc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/cases/rtc.py b/meta/lib/oeqa/runtime/cases/rtc.py index c4e6681324..39f4d29f23 100644 --- a/meta/lib/oeqa/runtime/cases/rtc.py +++ b/meta/lib/oeqa/runtime/cases/rtc.py | |||
@@ -1,5 +1,6 @@ | |||
1 | from oeqa.runtime.case import OERuntimeTestCase | 1 | from oeqa.runtime.case import OERuntimeTestCase |
2 | from oeqa.core.decorator.depends import OETestDepends | 2 | from oeqa.core.decorator.depends import OETestDepends |
3 | from oeqa.core.decorator.data import skipIfFeature | ||
3 | from oeqa.runtime.decorator.package import OEHasPackage | 4 | from oeqa.runtime.decorator.package import OEHasPackage |
4 | 5 | ||
5 | import re | 6 | import re |
@@ -16,12 +17,14 @@ class RTCTest(OERuntimeTestCase): | |||
16 | self.logger.debug('Starting systemd-timesyncd daemon') | 17 | self.logger.debug('Starting systemd-timesyncd daemon') |
17 | self.target.run('systemctl enable --now --runtime systemd-timesyncd') | 18 | self.target.run('systemctl enable --now --runtime systemd-timesyncd') |
18 | 19 | ||
20 | @skipIfFeature('read-only-rootfs', | ||
21 | 'Test does not work with read-only-rootfs in IMAGE_FEATURES') | ||
19 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 22 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
20 | @OEHasPackage(['coreutils', 'busybox']) | 23 | @OEHasPackage(['coreutils', 'busybox']) |
21 | def test_rtc(self): | 24 | def test_rtc(self): |
22 | (status, output) = self.target.run('hwclock -r') | 25 | (status, output) = self.target.run('hwclock -r') |
23 | self.assertEqual(status, 0, msg='Failed to get RTC time, output: %s' % output) | 26 | self.assertEqual(status, 0, msg='Failed to get RTC time, output: %s' % output) |
24 | 27 | ||
25 | (status, current_datetime) = self.target.run('date +"%m%d%H%M%Y"') | 28 | (status, current_datetime) = self.target.run('date +"%m%d%H%M%Y"') |
26 | self.assertEqual(status, 0, msg='Failed to get system current date & time, output: %s' % current_datetime) | 29 | self.assertEqual(status, 0, msg='Failed to get system current date & time, output: %s' % current_datetime) |
27 | 30 | ||
@@ -32,7 +35,6 @@ class RTCTest(OERuntimeTestCase): | |||
32 | 35 | ||
33 | (status, output) = self.target.run('date %s' % current_datetime) | 36 | (status, output) = self.target.run('date %s' % current_datetime) |
34 | self.assertEqual(status, 0, msg='Failed to reset system date & time, output: %s' % output) | 37 | self.assertEqual(status, 0, msg='Failed to reset system date & time, output: %s' % output) |
35 | 38 | ||
36 | (status, output) = self.target.run('hwclock -w') | 39 | (status, output) = self.target.run('hwclock -w') |
37 | self.assertEqual(status, 0, msg='Failed to reset RTC time, output: %s' % output) | 40 | self.assertEqual(status, 0, msg='Failed to reset RTC time, output: %s' % output) |
38 | |||