diff options
author | Alexander Kanavin <alex@linutronix.de> | 2024-05-07 13:46:27 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-28 09:38:23 +0100 |
commit | c149c7460549a3c32938a4f5f5c7effdc2e1f85b (patch) | |
tree | d465627d8e423c376fed043c98c2d02bda7ab07f /meta/lib | |
parent | 11762e4dc3ce98d50b1f44832482bcc83c4da621 (diff) | |
download | poky-c149c7460549a3c32938a4f5f5c7effdc2e1f85b.tar.gz |
selftest/sstatetests: separate sstate presence check into its own class
This allows reusing the check function in tests other than CDN/local mirror
ones, such as sstate bundle testing.
(From OE-Core rev: 8a4ab4c063f307b480d98c6aac1e76cde0b9e99e)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sstatetests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 86d6cd7464..8f843139eb 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py | |||
@@ -917,8 +917,7 @@ INHERIT += "base-do-configure-modified" | |||
917 | """, | 917 | """, |
918 | expected_sametmp_output, expected_difftmp_output) | 918 | expected_sametmp_output, expected_difftmp_output) |
919 | 919 | ||
920 | @OETestTag("yocto-mirrors") | 920 | class SStateCheckObjectPresence(SStateBase): |
921 | class SStateMirrors(SStateBase): | ||
922 | def check_bb_output(self, output, exceptions, check_cdn): | 921 | def check_bb_output(self, output, exceptions, check_cdn): |
923 | def is_exception(object, exceptions): | 922 | def is_exception(object, exceptions): |
924 | for e in exceptions: | 923 | for e in exceptions: |
@@ -960,6 +959,8 @@ class SStateMirrors(SStateBase): | |||
960 | self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}\nFetcher diagnostics:\n{}".format(missing_objects, "\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) | 959 | self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}\nFetcher diagnostics:\n{}".format(missing_objects, "\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) |
961 | self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}\nFetcher diagnostics:\n{}".format("\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) | 960 | self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}\nFetcher diagnostics:\n{}".format("\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) |
962 | 961 | ||
962 | @OETestTag("yocto-mirrors") | ||
963 | class SStateMirrors(SStateCheckObjectPresence): | ||
963 | def run_test(self, machine, targets, exceptions, check_cdn = True, ignore_errors = False): | 964 | def run_test(self, machine, targets, exceptions, check_cdn = True, ignore_errors = False): |
964 | # sstate is checked for existence of these, but they never get written out to begin with | 965 | # sstate is checked for existence of these, but they never get written out to begin with |
965 | exceptions += ["{}.*image_qa".format(t) for t in targets.split()] | 966 | exceptions += ["{}.*image_qa".format(t) for t in targets.split()] |