summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-01-10 11:44:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-12 11:51:18 +0000
commite37445320ca1a8913d6ed768681ff32de24eef94 (patch)
treec39b50a758676567e7c5bf5c43d4bfde023ffcbf /meta/lib/oeqa/selftest/cases
parentcd31bb507bfb794379950dd0aa38b810ba194d2f (diff)
downloadopenembedded-core-e37445320ca1a8913d6ed768681ff32de24eef94.tar.gz
selftest/SStatePrintdiff: ensure all base signatures are present in sstate in test_image_minimal_vs_base_do_configure
The test relies on all tasks in the dependency tree of the tasks being changed having valid signatures in sstate, so that the recursive discovery of the base invalid tasks stops there, and doesn't go further. This may not always occur, particularly when hash equivalency combined with different build host architectures prevents them from getting created in regular builds: https://autobuilder.yoctoproject.org/typhoon/#/builders/127/builds/2725/steps/15/logs/stdio The other two tests (that change specific recipes) already ensure this, but this test (which changes a basic task definition) does not. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py34
1 files changed, 19 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 6a6c2e5f11..f763228645 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -797,13 +797,14 @@ TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}"
for item in expected_difftmp_output:
self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output))
- def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output):
+ def run_test_printdiff_changeconfig(self, target, change_bbtasks, change_content, expected_sametmp_output, expected_difftmp_output):
import time
self.write_config("""
TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-sametmp-{}"
""".format(time.time()))
bitbake("--runall build --runall deploy_source_date_epoch {}".format(target))
bitbake("-S none {}".format(target))
+ bitbake(" ".join(change_bbtasks))
self.append_config(change_content)
result_sametmp = bitbake("-S printdiff {}".format(target))
@@ -859,24 +860,27 @@ expected_sametmp_output, expected_difftmp_output)
# Check if changing a really base task definiton is reported against multiple core recipes using it
def test_image_minimal_vs_base_do_configure(self):
- expected_output = ("Task zstd-native:do_configure couldn't be used from the cache because:",
-"Task texinfo-dummy-native:do_configure couldn't be used from the cache because:",
-"Task ldconfig-native:do_configure couldn't be used from the cache because:",
-"Task gettext-minimal-native:do_configure couldn't be used from the cache because:",
-"Task tzcode-native:do_configure couldn't be used from the cache because:",
-"Task makedevs-native:do_configure couldn't be used from the cache because:",
-"Task pigz-native:do_configure couldn't be used from the cache because:",
-"Task update-rc.d-native:do_configure couldn't be used from the cache because:",
-"Task unzip-native:do_configure couldn't be used from the cache because:",
-"Task gnu-config-native:do_configure couldn't be used from the cache because:",
+ change_bbtasks = ('zstd-native:do_configure',
+'texinfo-dummy-native:do_configure',
+'ldconfig-native:do_configure',
+'gettext-minimal-native:do_configure',
+'tzcode-native:do_configure',
+'makedevs-native:do_configure',
+'pigz-native:do_configure',
+'update-rc.d-native:do_configure',
+'unzip-native:do_configure',
+'gnu-config-native:do_configure')
+
+ expected_output = ["Task {} couldn't be used from the cache because:".format(t) for t in change_bbtasks] + [
"We need hash",
-"most recent matching task was")
- expected_sametmp_output = expected_output + (
+"most recent matching task was"]
+
+ expected_sametmp_output = expected_output + [
"Variable base_do_configure value changed",
-'+ echo "this changes base_do_configure() definiton "')
+'+ echo "this changes base_do_configure() definiton "']
expected_difftmp_output = expected_output
- self.run_test_printdiff_changeconfig("core-image-minimal",
+ self.run_test_printdiff_changeconfig("core-image-minimal",change_bbtasks,
"""
INHERIT += "base-do-configure-modified"
""",