aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/buildoptions.py
diff options
context:
space:
mode:
authorCorneliu Stoicescu <corneliux.stoicescu@intel.com>2014-02-27 15:53:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-28 13:52:43 +0000
commit45709d1eae28fc567c5dca9a48393d56d28f785d (patch)
tree82bb953a99edb72864b91d491deb2e4c97ce1f8c /meta/lib/oeqa/selftest/buildoptions.py
parent5c1eeb5d16566521e45947b07fdcd9f552fec45b (diff)
downloadopenembedded-core-contrib-45709d1eae28fc567c5dca9a48393d56d28f785d.tar.gz
openembedded-core-contrib-45709d1eae28fc567c5dca9a48393d56d28f785d.tar.bz2
openembedded-core-contrib-45709d1eae28fc567c5dca9a48393d56d28f785d.zip
oe-selftest: Fix for test_rm_old_image
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> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/lib/oeqa/selftest/buildoptions.py')
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index ef6579b335..93b02cf8a2 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)
+ 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")