diff options
-rw-r--r-- | meta/lib/oeqa/runtime/cases/systemd.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py index c11fa49b07..7c44abe8ed 100644 --- a/meta/lib/oeqa/runtime/cases/systemd.py +++ b/meta/lib/oeqa/runtime/cases/systemd.py | |||
@@ -9,7 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase | |||
9 | from oeqa.core.decorator.depends import OETestDepends | 9 | from oeqa.core.decorator.depends import OETestDepends |
10 | from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar | 10 | from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar |
11 | from oeqa.runtime.decorator.package import OEHasPackage | 11 | from oeqa.runtime.decorator.package import OEHasPackage |
12 | from oeqa.core.decorator.data import skipIfNotFeature | 12 | from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature |
13 | 13 | ||
14 | class SystemdTest(OERuntimeTestCase): | 14 | class SystemdTest(OERuntimeTestCase): |
15 | 15 | ||
@@ -114,12 +114,26 @@ class SystemdServiceTests(SystemdTest): | |||
114 | self.systemctl('is-active', 'avahi-daemon.service', verbose=True) | 114 | self.systemctl('is-active', 'avahi-daemon.service', verbose=True) |
115 | 115 | ||
116 | @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) | 116 | @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) |
117 | @skipIfFeature('read-only-rootfs', | ||
118 | 'Test is only meant to run without read-only-rootfs in IMAGE_FEATURES') | ||
117 | def test_systemd_disable_enable(self): | 119 | def test_systemd_disable_enable(self): |
118 | self.systemctl('disable', 'avahi-daemon.service') | 120 | self.systemctl('disable', 'avahi-daemon.service') |
119 | self.systemctl('is-enabled', 'avahi-daemon.service', expected=1) | 121 | self.systemctl('is-enabled', 'avahi-daemon.service', expected=1) |
120 | self.systemctl('enable', 'avahi-daemon.service') | 122 | self.systemctl('enable', 'avahi-daemon.service') |
121 | self.systemctl('is-enabled', 'avahi-daemon.service') | 123 | self.systemctl('is-enabled', 'avahi-daemon.service') |
122 | 124 | ||
125 | @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) | ||
126 | @skipIfNotFeature('read-only-rootfs', | ||
127 | 'Test is only meant to run with read-only-rootfs in IMAGE_FEATURES') | ||
128 | def test_systemd_disable_enable_ro(self): | ||
129 | status = self.target.run('mount -orw,remount /')[0] | ||
130 | self.assertTrue(status == 0, msg='Remounting / as r/w failed') | ||
131 | try: | ||
132 | self.test_systemd_disable_enable() | ||
133 | finally: | ||
134 | status = self.target.run('mount -oro,remount /')[0] | ||
135 | self.assertTrue(status == 0, msg='Remounting / as r/o failed') | ||
136 | |||
123 | class SystemdJournalTests(SystemdTest): | 137 | class SystemdJournalTests(SystemdTest): |
124 | 138 | ||
125 | @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) | 139 | @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) |