소스 검색

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>
Alexander Kanavin 1 년 전
부모
커밋
67be7cf82b
2개의 변경된 파일13개의 추가작업 그리고 9개의 파일을 삭제
  1. 0 0
      meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
  2. 13 9
      meta/lib/oeqa/selftest/cases/sstatetests.py

+ 0 - 0
meta-selftest/recipes-test/quilt-native/quilt-native_%.bbappend → meta-selftest/recipes-test/perlcross/perlcross_%.bbappend


+ 13 - 9
meta/lib/oeqa/selftest/cases/sstatetests.py

@@ -820,14 +820,16 @@ TMPDIR = "${{TOPDIR}}/tmp-sstateprintdiff-difftmp-{}"
 
 
     # Check if printdiff walks the full dependency chain from the image target to where the change is in a specific recipe
-    def test_image_minimal_vs_quilt(self):
-        expected_output = ("Task quilt-native:do_install couldn't be used from the cache because:",
+    def test_image_minimal_vs_perlcross(self):
+        expected_output = ("Task perlcross-native:do_install couldn't be used from the cache because:",
 "We need hash",
 "most recent matching task was")
-        expected_sametmp_output = expected_output + ("Variable do_install value changed",'+    echo "this changes the task signature"')
+        expected_sametmp_output = expected_output + (
+"Variable do_install value changed",
+'+    echo "this changes the task signature"')
         expected_difftmp_output = expected_output
 
-        self.run_test_printdiff_changerecipe("core-image-minimal", "quilt-native", "-c do_install quilt-native",
+        self.run_test_printdiff_changerecipe("core-image-minimal", "perlcross", "-c do_install perlcross-native",
 """
 do_install:append() {
     echo "this changes the task signature"
@@ -842,10 +844,10 @@ expected_sametmp_output, expected_difftmp_output)
         expected_output = ("Task {}:do_preconfigure couldn't be used from the cache because:".format(gcc_source_pn),
 "We need hash",
 "most recent matching task was")
-        expected_sametmp_output = expected_output + ("Variable do_preconfigure value changed",'+    print("this changes the task signature")')
-        #FIXME: printdiff is supposed to find at least one preconfigure task signature in the sstate cache, but isn't able to
-        #expected_difftmp_output = expected_output
-        expected_difftmp_output = ()
+        expected_sametmp_output = expected_output + (
+"Variable do_preconfigure value changed",
+'+    print("this changes the task signature")')
+        expected_difftmp_output = expected_output
 
         self.run_test_printdiff_changerecipe("gcc-runtime", "gcc-source", "-c do_preconfigure {}".format(gcc_source_pn),
 """
@@ -869,7 +871,9 @@ expected_sametmp_output, expected_difftmp_output)
 "Task gnu-config-native:do_configure couldn't be used from the cache because:",
 "We need hash",
 "most recent matching task was")
-        expected_sametmp_output = expected_output + ("Variable base_do_configure value changed",'+	echo "this changes base_do_configure() definiton "')
+        expected_sametmp_output = expected_output + (
+"Variable base_do_configure value changed",
+'+	echo "this changes base_do_configure() definiton "')
         expected_difftmp_output = expected_output
 
         self.run_test_printdiff_changeconfig("core-image-minimal",