summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2014-12-31 10:59:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 17:04:46 +0000
commit8c9fb9dbe759cf489b86127e222bc75d7fa50038 (patch)
treec8da92ab99312d6a542fcc38edca61d4188ab811 /meta/lib
parent9c16a966ace724925afaaae0ab2a741dcb7d2340 (diff)
downloadpoky-8c9fb9dbe759cf489b86127e222bc75d7fa50038.tar.gz
oeqa/selftest: fix test_incremental_image_generation for changes in log output
test_incremental_image_generation case failed because the log output chanaged: FAIL: test_incremental_image_generation (oeqa.selftest.buildoptions.ImageOptionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildarea3/yzhao1/poky-build/meta/lib/oeqa/utils/decorators.py", line 90, in wrapped_f return func(*args) File "/buildarea3/yzhao1/poky-build/meta/lib/oeqa/selftest/buildoptions.py", line 25, in test_incremental_image_generation self.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs") AssertionError: 0 != 1 : No match for openssh-sshd in log.do_rootfs ---------------------------------------------------------------------- Using re search instead grep (From OE-Core rev: 1872a9430cec0c61f1ec349df198160addd430de) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/buildoptions.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 381741ef0d..926ffe9993 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -20,12 +20,15 @@ class ImageOptionsTests(oeSelfTest):
20 self.write_config('INC_RPM_IMAGE_GEN = "1"') 20 self.write_config('INC_RPM_IMAGE_GEN = "1"')
21 self.append_config('IMAGE_FEATURES += "ssh-server-openssh"') 21 self.append_config('IMAGE_FEATURES += "ssh-server-openssh"')
22 bitbake("core-image-minimal") 22 bitbake("core-image-minimal")
23 res = runCmd("grep 'Installing openssh-sshd' %s" % (os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")), ignore_status=True) 23 log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")
24 log_data_created = ftools.read_file(log_data_file)
25 incremental_created = re.search("NOTE: load old install solution for incremental install\nNOTE: old install solution not exist\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: Installing the following packages:.*packagegroup-core-ssh-openssh", log_data_created)
24 self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"') 26 self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
25 self.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs") 27 self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % log_data_created)
26 bitbake("core-image-minimal") 28 bitbake("core-image-minimal")
27 res = runCmd("grep 'Removing openssh-sshd' %s" %(os.path.join(get_bb_var("WORKDIR", "core-image-minimal"), "temp/log.do_rootfs")),ignore_status=True) 29 log_data_removed = ftools.read_file(log_data_file)
28 self.assertEqual(0, res.status, msg="openssh-sshd was not removed from image") 30 incremental_removed = re.search("NOTE: load old install solution for incremental install\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
31 self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
29 32
30 @testcase(925) 33 @testcase(925)
31 def test_rm_old_image(self): 34 def test_rm_old_image(self):