summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-03-13 19:51:28 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-14 17:13:11 +0000
commitac5948736432355e30288ad6f7109821eadf04f5 (patch)
tree30bab7656be4e1ccfa723233779f9d4c33c8da87 /meta
parent381d33eb5da24443a89b8d80fb202ed4bfd11ea7 (diff)
downloadpoky-ac5948736432355e30288ad6f7109821eadf04f5.tar.gz
oeqa rtc.py: skip if read-only-rootfs
hwclock command fails on read-only-rootfs: AssertionError: 1 != 0 : Failed to reset RTC time, output: hwclock: cannot open /etc/adjtime: Read-only file system (From OE-Core rev: 017bf8c160f6ab67d9f8e8d9e30b15bf84f73807) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/runtime/cases/rtc.py8
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 b2159b1134..6e45c5db4f 100644
--- a/meta/lib/oeqa/runtime/cases/rtc.py
+++ b/meta/lib/oeqa/runtime/cases/rtc.py
@@ -5,6 +5,7 @@
5# 5#
6from oeqa.runtime.case import OERuntimeTestCase 6from oeqa.runtime.case import OERuntimeTestCase
7from oeqa.core.decorator.depends import OETestDepends 7from oeqa.core.decorator.depends import OETestDepends
8from oeqa.core.decorator.data import skipIfFeature
8from oeqa.runtime.decorator.package import OEHasPackage 9from oeqa.runtime.decorator.package import OEHasPackage
9 10
10import re 11import re
@@ -21,12 +22,14 @@ class RTCTest(OERuntimeTestCase):
21 self.logger.debug('Starting systemd-timesyncd daemon') 22 self.logger.debug('Starting systemd-timesyncd daemon')
22 self.target.run('systemctl enable --now --runtime systemd-timesyncd') 23 self.target.run('systemctl enable --now --runtime systemd-timesyncd')
23 24
25 @skipIfFeature('read-only-rootfs',
26 'Test does not work with read-only-rootfs in IMAGE_FEATURES')
24 @OETestDepends(['ssh.SSHTest.test_ssh']) 27 @OETestDepends(['ssh.SSHTest.test_ssh'])
25 @OEHasPackage(['coreutils', 'busybox']) 28 @OEHasPackage(['coreutils', 'busybox'])
26 def test_rtc(self): 29 def test_rtc(self):
27 (status, output) = self.target.run('hwclock -r') 30 (status, output) = self.target.run('hwclock -r')
28 self.assertEqual(status, 0, msg='Failed to get RTC time, output: %s' % output) 31 self.assertEqual(status, 0, msg='Failed to get RTC time, output: %s' % output)
29 32
30 (status, current_datetime) = self.target.run('date +"%m%d%H%M%Y"') 33 (status, current_datetime) = self.target.run('date +"%m%d%H%M%Y"')
31 self.assertEqual(status, 0, msg='Failed to get system current date & time, output: %s' % current_datetime) 34 self.assertEqual(status, 0, msg='Failed to get system current date & time, output: %s' % current_datetime)
32 35
@@ -37,7 +40,6 @@ class RTCTest(OERuntimeTestCase):
37 40
38 (status, output) = self.target.run('date %s' % current_datetime) 41 (status, output) = self.target.run('date %s' % current_datetime)
39 self.assertEqual(status, 0, msg='Failed to reset system date & time, output: %s' % output) 42 self.assertEqual(status, 0, msg='Failed to reset system date & time, output: %s' % output)
40 43
41 (status, output) = self.target.run('hwclock -w') 44 (status, output) = self.target.run('hwclock -w')
42 self.assertEqual(status, 0, msg='Failed to reset RTC time, output: %s' % output) 45 self.assertEqual(status, 0, msg='Failed to reset RTC time, output: %s' % output)
43