Bug 5953 - Add a test to ensure buildhistory does not change signatures
Summary: Add a test to ensure buildhistory does not change signatures
Status: RESOLVED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium enhancement
Target Milestone: 2.1 M2
Assignee: Daniel Istrate
QA Contact: Bogdan Alexandru Voiculescu
URL:
Whiteboard: TC needed
Depends on:
Blocks:
 
Reported: 2014-03-12 10:14 UTC by Paul Eggleton
Modified: 2015-12-28 12:53 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2014-03-12 10:14:34 UTC
In 1.6 we've made it so that adding and removing INHERIT += "buildhistory" will not change task signatures (other than perhaps do_rootfs or do_populate_sysroot itself). However, because this is dependent on us tweaking variable dependencies to avoid signatures changing, the way the signatures are calculated can change as fixes go in so it's possible we will have regressions in future (as shown demonstrated in bug 5897). Thus, we should have a test to ensure that this continues to work as expected.

The test would be as follows:

1) Ensure core-image-minimal (or some other image) is built, without INHERIT += "buildhistory" in the configuration. This doesn't have to be done as part of the test, we just need TMPDIR populated.

2) Add INHERIT += "buildhistory" to the configuration and then bitbake the image again

3) Check if any real tasks other than do_rootfs executed.

Alternatively, we could combine this with a test of buildhistory operation when restoring from the sstate cache:

1) Ensure sstate is populated for an image (without INHERIT += "buildhistory" in the configuration), and TMPDIR is deleted. Again, this doesn't have to be done as part of the test, we just need the cache populated.

2) Add INHERIT += "buildhistory" to the configuration and then bitbake the image again

3) Check if any real tasks other than do_rootfs executed.

4) Check if buildhistory for the image and packages that are included in the image was correctly populated.
Comment 1 Richard Purdie 2015-12-14 15:48:26 UTC
With the new sstate test infrastructure we can do better than running a build, it can be modelled on lib/oe/qa/selftest/sstatetests.py, take something like test_sstate_sametune_samesigs() but create a version which does "bitbake core-image-sato -S none", then add buildhistory, do "bitbake core-image-sato -S none" again, then check that no new sigatures appears apart from do_rootfs/do_build.
Comment 3 Daniel Istrate 2015-12-28 12:53:12 UTC
As of 4c35473a186569daf1685dc3190972299070a661 patch merged into master.