Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] selftest/wic: test wic rm with -r flag
@ 2019-11-15  1:58 chee.yang.lee
  2019-11-15  1:58 ` [PATCH 2/2] wic: rm with -r flag support chee.yang.lee
  0 siblings, 1 reply; 4+ messages in thread
From: chee.yang.lee @ 2019-11-15  1:58 UTC (permalink / raw)
  To: openembedded-core

From: Chee Yang Lee <chee.yang.lee@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@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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-15 11:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-15  1:58 [PATCH 1/2] selftest/wic: test wic rm with -r flag chee.yang.lee
2019-11-15  1:58 ` [PATCH 2/2] wic: rm with -r flag support chee.yang.lee
2019-11-15 11:47   ` Richard Purdie
2019-11-15 11:48     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox