summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-12-18 09:43:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-10 16:32:13 +0000
commit67be7cf82ba205092c0a3cdd41df5b2a96d444fd (patch)
tree084bb6e9a93d7bdf493c95b5d1829a40d3457e1d
parent67e3f243339131741271c58abc987aef33f6b76c (diff)
downloadpoky-67be7cf82ba205092c0a3cdd41df5b2a96d444fd.tar.gz
selftest/sstatetests: fix up printdiff test to match rework of printdiff logic
Other than the formatting changes, there are two functional ones: - use perlcross instead of quilt, as quilt is special in the sense of being excluded from task hash calculcations. perlcross is a full participant. - run the full test (local + sstate) for gcc do_preconfiure change as the necessary fix has been implemented (sstatesig/find_siginfo: special-case gcc-source when looking in sstate caches) Note that when several tasks are found to have changed (as is the case when base do_configure is adjusted), find_siginfo() runs glob.glob("*/*/*taskname*") against autobuilder sstate cache for each of those tasks (six or seven times). This is an expensive operation taking several minutes. I left it in for now, but if it's proven too slow the test would have to be reduced to checking a specific base recipe (e.g. zstd-native) rather than a distant image target. [YOCTO #15289] (From OE-Core rev: 0ef7cf324718412c5b6c376acfbc4079ecd7d465) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta-selftest/recipes-test/perlcross/perlcross_%.bbappend (renamed from meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend)0
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py22
2 files changed, 13 insertions, 9 deletions
diff --git a/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
index 205720982c..205720982c 100644
--- a/meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend
+++ b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 393eaf6339..4972ff70ca 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -820,14 +820,16 @@ TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}"
820 820
821 821
822 # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe 822 # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe
823 def test_image_minimal_vs_quilt(self): 823 def test_image_minimal_vs_perlcross(self):
824 expected_output = ("Task quilt-native:do_install couldn't be used from the cache because:", 824 expected_output = ("Task perlcross-native:do_install couldn't be used from the cache because:",
825"We need hash", 825"We need hash",
826"most recent matching task was") 826"most recent matching task was")
827 expected_sametmp_output = expected_output + ("Variable do_install value changed",'+ echo "this changes the task signature"') 827 expected_sametmp_output = expected_output + (
828"Variable do_install value changed",
829'+ echo "this changes the task signature"')
828 expected_difftmp_output = expected_output 830 expected_difftmp_output = expected_output
829 831
830 self.run_test_printdiff_changerecipe("core-image-minimal", "quilt-native", "-c do_install quilt-native", 832 self.run_test_printdiff_changerecipe("core-image-minimal", "perlcross", "-c do_install perlcross-native",
831""" 833"""
832do_install:append() { 834do_install:append() {
833 echo "this changes the task signature" 835 echo "this changes the task signature"
@@ -842,10 +844,10 @@ expected_sametmp_output, expected_difftmp_output)
842 expected_output = ("Task {}:do_preconfigure couldn't be used from the cache because:".format(gcc_source_pn), 844 expected_output = ("Task {}:do_preconfigure couldn't be used from the cache because:".format(gcc_source_pn),
843"We need hash", 845"We need hash",
844"most recent matching task was") 846"most recent matching task was")
845 expected_sametmp_output = expected_output + ("Variable do_preconfigure value changed",'+ print("this changes the task signature")') 847 expected_sametmp_output = expected_output + (
846 #FIXME: printdiff is supposed to find at least one preconfigure task signature in the sstate cache, but isn't able to 848"Variable do_preconfigure value changed",
847 #expected_difftmp_output = expected_output 849'+ print("this changes the task signature")')
848 expected_difftmp_output = () 850 expected_difftmp_output = expected_output
849 851
850 self.run_test_printdiff_changerecipe("gcc-runtime", "gcc-source", "-c do_preconfigure {}".format(gcc_source_pn), 852 self.run_test_printdiff_changerecipe("gcc-runtime", "gcc-source", "-c do_preconfigure {}".format(gcc_source_pn),
851""" 853"""
@@ -869,7 +871,9 @@ expected_sametmp_output, expected_difftmp_output)
869"Task gnu-config-native:do_configure couldn't be used from the cache because:", 871"Task gnu-config-native:do_configure couldn't be used from the cache because:",
870"We need hash", 872"We need hash",
871"most recent matching task was") 873"most recent matching task was")
872 expected_sametmp_output = expected_output + ("Variable base_do_configure value changed",'+ echo "this changes base_do_configure() definiton "') 874 expected_sametmp_output = expected_output + (
875"Variable base_do_configure value changed",
876'+ echo "this changes base_do_configure() definiton "')
873 expected_difftmp_output = expected_output 877 expected_difftmp_output = expected_output
874 878
875 self.run_test_printdiff_changeconfig("core-image-minimal", 879 self.run_test_printdiff_changeconfig("core-image-minimal",