diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/systemd.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py index 5935edd549..c74394ca54 100644 --- a/meta/lib/oeqa/runtime/systemd.py +++ b/meta/lib/oeqa/runtime/systemd.py | |||
@@ -67,13 +67,19 @@ class SystemdBasicTests(SystemdTest): | |||
67 | 67 | ||
68 | class SystemdServiceTests(SystemdTest): | 68 | class SystemdServiceTests(SystemdTest): |
69 | 69 | ||
70 | def check_for_avahi(self): | ||
71 | if not self.hasPackage('avahi-daemon'): | ||
72 | raise unittest.SkipTest("Testcase dependency not met: need avahi-daemon installed on target") | ||
73 | |||
70 | @skipUnlessPassed('test_systemd_basic') | 74 | @skipUnlessPassed('test_systemd_basic') |
71 | def test_systemd_status(self): | 75 | def test_systemd_status(self): |
76 | self.check_for_avahi() | ||
72 | self.systemctl('status --full', 'avahi-daemon.service') | 77 | self.systemctl('status --full', 'avahi-daemon.service') |
73 | 78 | ||
74 | @testcase(695) | 79 | @testcase(695) |
75 | @skipUnlessPassed('test_systemd_status') | 80 | @skipUnlessPassed('test_systemd_status') |
76 | def test_systemd_stop_start(self): | 81 | def test_systemd_stop_start(self): |
82 | self.check_for_avahi() | ||
77 | self.systemctl('stop', 'avahi-daemon.service') | 83 | self.systemctl('stop', 'avahi-daemon.service') |
78 | self.systemctl('is-active', 'avahi-daemon.service', expected=3, verbose=True) | 84 | self.systemctl('is-active', 'avahi-daemon.service', expected=3, verbose=True) |
79 | self.systemctl('start','avahi-daemon.service') | 85 | self.systemctl('start','avahi-daemon.service') |
@@ -82,6 +88,7 @@ class SystemdServiceTests(SystemdTest): | |||
82 | @testcase(696) | 88 | @testcase(696) |
83 | @skipUnlessPassed('test_systemd_basic') | 89 | @skipUnlessPassed('test_systemd_basic') |
84 | def test_systemd_disable_enable(self): | 90 | def test_systemd_disable_enable(self): |
91 | self.check_for_avahi() | ||
85 | self.systemctl('disable', 'avahi-daemon.service') | 92 | self.systemctl('disable', 'avahi-daemon.service') |
86 | self.systemctl('is-enabled', 'avahi-daemon.service', expected=1) | 93 | self.systemctl('is-enabled', 'avahi-daemon.service', expected=1) |
87 | self.systemctl('enable', 'avahi-daemon.service') | 94 | self.systemctl('enable', 'avahi-daemon.service') |