oe-selftest: Fixed "test_rm_old_image" that was outdated
PATCH 1/1 oe-selftest: Fixed "test_rm_old_image" that was outdated
This test used the old format of IMAGE_LINK_NAME that used to contain DATETIME information. Now it uses IMAGE_LINK_NAME and DATETIME variables to determine the path to the image.
--- meta/lib/oeqa/selftest/buildoptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/buildoptions.py +2 -1
@@ -26,7 +26,8 @@ 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")) + datetime = get_bb_var("DATETIME", target="core-image-minimal") + oldimgpath = os.path.realpath(os.path.join(deploydir, imagename + '-' + datetime + ".rootfs.ext3")) 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)
Signature · 1 line
1.7.9.5
After a second look, this test case will always pass because the DATETIME variable will not give the correct date+time for the core-image-minimal that was already built, so it will never find the image that it's looking for. Please ignore this patch, I will send an update as soon as I can.
Regards,
Corneliu
Quoted 39 lines
-----Original Message-----
From: Stoicescu, CorneliuX
Sent: Monday, February 17, 2014 6:09 PM
To: [email protected]
Cc: Stoicescu, CorneliuX
Subject: [PATCH] oe-selftest: Fixed "test_rm_old_image" that was outdatedThis test used the old format of
IMAGE_LINK_NAMEthat used to contain DATETIME information.
Now it usesIMAGE_LINK_NAMEand DATETIME variables to determine the path to the image.Signed-off-by Corneliu Stoicescu <[email protected]>--- meta/lib/oeqa/selftest/buildoptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/lib/oeqa/selftest/buildoptions.py +3
-1@@ -26,7 +26,8 @@ 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")) + datetime = get_bb_var("DATETIME", target="core-image-minimal") + oldimgpath = os.path.realpath(os.path.join(deploydir, imagename + '-' + datetime + ".rootfs.ext3")) self.append_config("RM_OLD_IMAGE = \"1\"") bitbake("core-image-minimal") self.assertFalse(os.path.exists(oldimgpath), msg="Old image path stillexists: %s" % oldimgpath)
--
1.7.9.5