diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-10-23 13:06:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-27 10:53:43 +0100 |
commit | 2187e823ad66eaaee6a4ed7d748f2c68028a45e7 (patch) | |
tree | a668f076ef4531d0c38b4a57bdb94e9de766a9c8 /meta-selftest | |
parent | 7e0cce4f6b754e33a0652b516d622b6b40b3abd7 (diff) | |
download | poky-2187e823ad66eaaee6a4ed7d748f2c68028a45e7.tar.gz |
selftest/sstatetests: add tests for 'bitbake -S printdiff'
'bitbake -S printdiff' is a useful diagnostic facility for finding out
why sstate is not being reused, but until now it had no tests that would
ensure it works. This commit adds three basic scenarios:
1. make a change in a really basic, common recipe that is at the very root
of dependency trees (quilt-native), and ensure that change is correctly discovered when
building an image.
2. make a change in gcc-source recipe, which is somewhat special
(operates in work-shared), and ensure that gcc-runtime builds track
that down as well.
3. make a change in base_do_configure() definition from base.bbclass,
which is not recipe-specific, but affects many basic recipes, and ensure that
is correctly reported as well.
The test itself actually runs twice:
- first against a fully populated build directory, where
the printdiff code is guaranteed to find the correct previous
stamp that can be compared with in a predictable manner.
- then in an empty build directory where the printdiff code
goes to look in the sstate cache, and so the existence of the
previous signature can be tested, but not the difference with it
(what the exact difference would be is unpredictable as the
sstate cache is indeed shared between many builds).
(From OE-Core rev: 7a7d76aa8a8d590ebc99156f9f4b9535cdf868c7)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
3 files changed, 7 insertions, 0 deletions
diff --git a/meta-selftest/classes/base-do-configure-modified.bbclass b/meta-selftest/classes/base-do-configure-modified.bbclass new file mode 100644 index 0000000000..3f96827a42 --- /dev/null +++ b/meta-selftest/classes/base-do-configure-modified.bbclass | |||
@@ -0,0 +1,3 @@ | |||
1 | base_do_configure:append () { | ||
2 | echo "this changes base_do_configure() definiton" | ||
3 | } | ||
diff --git a/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend b/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||