Skip to contentSkip to conversation

oe-selftest: Fixed "test_rm_old_image" that was outdated

PATCH In review Corneliu Stoicescu 1 participant 2 messages Feb 17, 2014

lore
Share & tools
lore
#0 lore raw

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
index ef6579b..9a22c06 100644
@@ -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
#1 lore raw

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 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 +3 -1
index ef6579b..9a22c06 100644
@@ -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)
--
1.7.9.5