Openembedded Core Discussions
 help / color / mirror / Atom feed
From: chee.yang.lee@intel.com
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] selftest/wic: test wic rm with -r flag
Date: Fri, 15 Nov 2019 09:58:47 +0800	[thread overview]
Message-ID: <1573783128-17519-1-git-send-email-chee.yang.lee@intel.com> (raw)

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



             reply	other threads:[~2019-11-15  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15  1:58 chee.yang.lee [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1573783128-17519-1-git-send-email-chee.yang.lee@intel.com \
    --to=chee.yang.lee@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox