[OE-core] [PATCH 1/2] selftest/wic: test wic rm with -r flag
chee.yang.lee at intel.com
chee.yang.lee at intel.com
Fri Nov 15 01:58:47 UTC 2019
From: Chee Yang Lee <chee.yang.lee at intel.com>
selftest to make sure wic rm with -r flag for ext partition
could remove directory and all its content.
Signed-off-by: Chee Yang Lee <chee.yang.lee at intel.com>
---
meta/lib/oeqa/selftest/cases/wic.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index ea75300..0c03b4b 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1025,3 +1025,10 @@ class Wic2(WicTestCase):
# check if it's removed
result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot))
self.assertTrue('fstab' not in [line.split()[-1] for line in result.output.split('\n') if line])
+
+ # remove non-empty directory
+ runCmd("wic rm -r %s:2/etc/ -n %s" % (images[0], sysroot))
+
+ # check if it's removed
+ result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot))
+ self.assertTrue('etc' not in [line.split()[-1] for line in result.output.split('\n') if line])
--
2.7.4
More information about the Openembedded-core
mailing list