minimal unconfigured testbed.
* Add missing python3 test dependency to cmdline-upstart-boot and
display-managers autopkgtests.
+ * debian/tests/boot-and-services: Skip AppArmor test if AppArmor is not
+ enabled.
-- Martin Pitt <mpitt@debian.org> Thu, 19 Feb 2015 11:13:26 +0100
# FIXME: ignore /etc/modules failure as stuff that we put there by
# default often fails
failed = [f for f in failed if 'systemd-modules-load' not in f]
+ # apparmor fails if not enabled in the kernel
+ if not os.path.exists('/sys/kernel/security/apparmor'):
+ failed = [f for f in failed if 'apparmor.service' not in f]
self.assertEqual(failed, [])
def test_lightdm(self):
self.assertIn(b'Requesting system poweroff', out)
+@unittest.skipUnless(os.path.exists('/sys/kernel/security/apparmor'),
+ 'AppArmor not enabled')
class AppArmorTest(unittest.TestCase):
def test_profile(self):
'''AppArmor confined unit'''