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:54:05 +0000
commitf315b097586814f9b2e24b21a12829777dedfc03 (patch)
treefdaaf3e262201eef9a31b6aa241276a0c23f0cbb /meta/lib/oeqa/selftest/cases
parent912dd772859ebccbebacfdb37c6dec2111d4dfd6 (diff)
downloadpoky-f315b097586814f9b2e24b21a12829777dedfc03.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. (From OE-Core rev: e37445320ca1a8913d6ed768681ff32de24eef94) 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-{}"
797 for item in expected_difftmp_output: 797 for item in expected_difftmp_output:
798 self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output)) 798 self.assertIn(item, result_difftmp.output, msg = "Item {} not found in output:\n{}".format(item, result_difftmp.output))
799 799
800 def run_test_printdiff_changeconfig(self, target, change_content, expected_sametmp_output, expected_difftmp_output): 800 def run_test_printdiff_changeconfig(self, target, change_bbtasks, change_content, expected_sametmp_output, expected_difftmp_output):
801 import time 801 import time
802 self.write_config(""" 802 self.write_config("""
803TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-sametmp-{}" 803TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-sametmp-{}"
804""".format(time.time())) 804""".format(time.time()))
805 bitbake("--runall build --runall deploy_source_date_epoch {}".format(target)) 805 bitbake("--runall build --runall deploy_source_date_epoch {}".format(target))
806 bitbake("-S none {}".format(target)) 806 bitbake("-S none {}".format(target))
807 bitbake(" ".join(change_bbtasks))
807 self.append_config(change_content) 808 self.append_config(change_content)
808 result_sametmp = bitbake("-S printdiff {}".format(target)) 809 result_sametmp = bitbake("-S printdiff {}".format(target))
809 810
@@ -859,24 +860,27 @@ expected_sametmp_output, expected_difftmp_output)
859 860
860 # Check if changing a really base task definiton is reported against multiple core recipes using it 861 # Check if changing a really base task definiton is reported against multiple core recipes using it
861 def test_image_minimal_vs_base_do_configure(self): 862 def test_image_minimal_vs_base_do_configure(self):
862 expected_output = ("Task zstd-native:do_configure couldn't be used from the cache because:", 863 change_bbtasks = ('zstd-native:do_configure',
863"Task texinfo-dummy-native:do_configure couldn't be used from the cache because:", 864'texinfo-dummy-native:do_configure',
864"Task ldconfig-native:do_configure couldn't be used from the cache because:", 865'ldconfig-native:do_configure',
865"Task gettext-minimal-native:do_configure couldn't be used from the cache because:", 866'gettext-minimal-native:do_configure',
866"Task tzcode-native:do_configure couldn't be used from the cache because:", 867'tzcode-native:do_configure',
867"Task makedevs-native:do_configure couldn't be used from the cache because:", 868'makedevs-native:do_configure',
868"Task pigz-native:do_configure couldn't be used from the cache because:", 869'pigz-native:do_configure',
869"Task update-rc.d-native:do_configure couldn't be used from the cache because:", 870'update-rc.d-native:do_configure',
870"Task unzip-native:do_configure couldn't be used from the cache because:", 871'unzip-native:do_configure',
871"Task gnu-config-native:do_configure couldn't be used from the cache because:", 872'gnu-config-native:do_configure')
873
874 expected_output = ["Task {} couldn't be used from the cache because:".format(t) for t in change_bbtasks] + [
872"We need hash", 875"We need hash",
873"most recent matching task was") 876"most recent matching task was"]
874 expected_sametmp_output = expected_output + ( 877
878 expected_sametmp_output = expected_output + [
875"Variable base_do_configure value changed", 879"Variable base_do_configure value changed",
876'+ echo "this changes base_do_configure() definiton "') 880'+ echo "this changes base_do_configure() definiton "']
877 expected_difftmp_output = expected_output 881 expected_difftmp_output = expected_output
878 882
879 self.run_test_printdiff_changeconfig("core-image-minimal", 883 self.run_test_printdiff_changeconfig("core-image-minimal",change_bbtasks,
880""" 884"""
881INHERIT += "base-do-configure-modified" 885INHERIT += "base-do-configure-modified"
882""", 886""",