From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] selftest/buildhistory: Improve test to remove sources of error
Date: Sun, 17 Jan 2016 11:17:47 +0000 [thread overview]
Message-ID: <1453029467.27999.17.camel@linuxfoundation.org> (raw)
When we add buildhistory, we expect do_rootfs to rerun, but depending
on IMAGE_FSTYPES, the number of tasks which would execute after
do_rootfs varies (e.g. live would add do_bootimg and we recently
added do_image).
Therefore limit the test to -c rootfs and then we're clear that only
one task should re-run.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 64ced15..6167fb2 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -122,7 +122,7 @@ class BuildhistoryTests(BuildhistoryBase):
def test_buildhistory_does_not_change_signatures(self):
"""
Summary: Ensure that buildhistory does not change signatures
- Expected: Only 'do_rootfs' and 'do_build' tasks are rerun
+ Expected: Only 'do_rootfs' task should be rerun
Product: oe-core
Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
@@ -139,12 +139,12 @@ class BuildhistoryTests(BuildhistoryBase):
features = 'TMPDIR = "%s"\n' % tmpdir1
self.write_config(features)
- bitbake('core-image-sato -S none')
+ bitbake('core-image-sato -S none -c rootfs')
features = 'TMPDIR = "%s"\n' % tmpdir2
features += 'INHERIT += "buildhistory"\n'
self.write_config(features)
- bitbake('core-image-sato -S none')
+ bitbake('core-image-sato -S none -c rootfs')
def get_files(d):
f = []
@@ -161,24 +161,20 @@ class BuildhistoryTests(BuildhistoryBase):
f2 = set(files2)
sigdiff = f1 - f2
- self.assertEqual(len(sigdiff), 2, 'Expected 2 signature differences. Out: %s' % list(sigdiff))
+ self.assertEqual(len(sigdiff), 1, 'Expected 1 signature differences. Out: %s' % list(sigdiff))
unexpected_diff = []
- # No new signatures should appear apart from do_rootfs and do_build
+ # No new signatures should appear apart from do_rootfs
found_do_rootfs_flag = False
- found_do_build_flag = False
for sig in sigdiff:
if 'do_rootfs' in sig:
found_do_rootfs_flag = True
- elif 'do_build' in sig:
- found_do_build_flag = True
else:
unexpected_diff.append(sig)
self.assertTrue(found_do_rootfs_flag, 'Task do_rootfs did not rerun.')
- self.assertTrue(found_do_build_flag, 'Task do_build did not rerun')
self.assertFalse(unexpected_diff, 'Found unexpected signature differences. Out: %s' % unexpected_diff)
reply other threads:[~2016-01-17 11:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1453029467.27999.17.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.