Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Alexandru Palalau <alexandrux.palalau@linux.intel.com>
To: Corneliu Stoicescu <corneliux.stoicescu@intel.com>,
	 openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] oe-selftest: Fix for test_rm_old_image
Date: Thu, 27 Feb 2014 15:57:47 +0200	[thread overview]
Message-ID: <530F445B.2030500@linux.intel.com> (raw)
In-Reply-To: <1393509196-26371-1-git-send-email-corneliux.stoicescu@intel.com>

On 2/27/2014 3:53 PM, Corneliu Stoicescu wrote:
> After recent changes in poky this test was not working as it should.
> This commit fixes and improves the test logic.
>
> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
> ---
>   meta/lib/oeqa/selftest/buildoptions.py | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
> index ef6579b..93b02cf 100644
> --- a/meta/lib/oeqa/selftest/buildoptions.py
> +++ b/meta/lib/oeqa/selftest/buildoptions.py
> @@ -26,10 +26,16 @@ class ImageOptionsTests(oeSelfTest):
>           bitbake("core-image-minimal")
>           deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
>           imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
> -        oldimgpath = os.path.realpath(os.path.join(deploydir, imagename + ".ext3"))
> +        deploydir_files = os.listdir(deploydir)
> +        track_original_files = []
> +        for image_file in deploydir_files:
> +            if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)):
> +                track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file)))
>           self.append_config("RM_OLD_IMAGE = \"1\"")
> -        bitbake("core-image-minimal")
> -        self.assertFalse(os.path.exists(oldimgpath), msg="Old image path still exists: %s" % oldimgpath)
> +        bitbake("-C rootfs core-image-minimal")
> +        deploydir_files = os.listdir(deploydir)
The line above appears twice.
> +        remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files]
> +        self.assertFalse(remaining_not_expected, msg="\nThe following image files ware not removed: %s" % ', '.join(map(str, remaining_not_expected)))
>
>       def test_ccache_tool(self):
>           bitbake("ccache-native")
>

Cheers,

-- 
Alexandru Palalau


  reply	other threads:[~2014-02-27 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 13:53 [PATCH] oe-selftest: Fix for test_rm_old_image Corneliu Stoicescu
2014-02-27 13:57 ` Alexandru Palalau [this message]
2014-02-27 15:02   ` Alexandru Palalau

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=530F445B.2030500@linux.intel.com \
    --to=alexandrux.palalau@linux.intel.com \
    --cc=corneliux.stoicescu@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