diff options
Diffstat (limited to 'poky/meta/lib/oeqa/runtime/cases')
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/df.py | 2 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/opkg.py | 4 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/systemd.py | 16 |
3 files changed, 19 insertions, 3 deletions
diff --git a/poky/meta/lib/oeqa/runtime/cases/df.py b/poky/meta/lib/oeqa/runtime/cases/df.py index d8d79f32ea..89fd0fb901 100644 --- a/poky/meta/lib/oeqa/runtime/cases/df.py +++ b/poky/meta/lib/oeqa/runtime/cases/df.py @@ -11,7 +11,7 @@ class DfTest(OERuntimeTestCase): @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['coreutils', 'busybox']) def test_df(self): - cmd = "df / | sed -n '2p' | awk '{print $4}'" + cmd = "df -P / | sed -n '2p' | awk '{print $4}'" (status,output) = self.target.run(cmd) msg = 'Not enough space on image. Current size is %s' % output self.assertTrue(int(output)>5120, msg=msg) diff --git a/poky/meta/lib/oeqa/runtime/cases/opkg.py b/poky/meta/lib/oeqa/runtime/cases/opkg.py index bb8b6d99d2..750706161b 100644 --- a/poky/meta/lib/oeqa/runtime/cases/opkg.py +++ b/poky/meta/lib/oeqa/runtime/cases/opkg.py @@ -5,7 +5,7 @@ import os from oeqa.utils.httpserver import HTTPService from oeqa.runtime.case import OERuntimeTestCase -from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature +from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfFeature from oeqa.runtime.decorator.package import OEHasPackage class OpkgTest(OERuntimeTestCase): @@ -45,6 +45,8 @@ class OpkgRepoTest(OpkgTest): 'Test requires package-management to be in IMAGE_FEATURES') @skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk', 'IPK is not the primary package manager') + @skipIfFeature('read-only-rootfs', + 'Test does not work with read-only-rootfs in IMAGE_FEATURES') @OEHasPackage(['opkg']) def test_opkg_install_from_repo(self): self.setup_source_config_for_package_install() diff --git a/poky/meta/lib/oeqa/runtime/cases/systemd.py b/poky/meta/lib/oeqa/runtime/cases/systemd.py index c11fa49b07..7c44abe8ed 100644 --- a/poky/meta/lib/oeqa/runtime/cases/systemd.py +++ b/poky/meta/lib/oeqa/runtime/cases/systemd.py @@ -9,7 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar from oeqa.runtime.decorator.package import OEHasPackage -from oeqa.core.decorator.data import skipIfNotFeature +from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature class SystemdTest(OERuntimeTestCase): @@ -114,12 +114,26 @@ class SystemdServiceTests(SystemdTest): self.systemctl('is-active', 'avahi-daemon.service', verbose=True) @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) + @skipIfFeature('read-only-rootfs', + 'Test is only meant to run without read-only-rootfs in IMAGE_FEATURES') def test_systemd_disable_enable(self): self.systemctl('disable', 'avahi-daemon.service') self.systemctl('is-enabled', 'avahi-daemon.service', expected=1) self.systemctl('enable', 'avahi-daemon.service') self.systemctl('is-enabled', 'avahi-daemon.service') + @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) + @skipIfNotFeature('read-only-rootfs', + 'Test is only meant to run with read-only-rootfs in IMAGE_FEATURES') + def test_systemd_disable_enable_ro(self): + status = self.target.run('mount -orw,remount /')[0] + self.assertTrue(status == 0, msg='Remounting / as r/w failed') + try: + self.test_systemd_disable_enable() + finally: + status = self.target.run('mount -oro,remount /')[0] + self.assertTrue(status == 0, msg='Remounting / as r/o failed') + class SystemdJournalTests(SystemdTest): @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) |