mirror of
https://git.yoctoproject.org/poky
synced 2026-02-14 12:43:03 +01:00
selftest/sstatetests: include fetcher diagnostics into CDN test failure message
This will help finding out what kind of error the server actually returned, as sporadic CDN failures continue to occur. [YOCTO #15335] (From OE-Core rev: 7f09c4c5a0fe4ff213f205927f618a77b72aeef3) 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>
This commit is contained in:
committed by
Richard Purdie
parent
90ca84dbf9
commit
46262ee83e
@@ -905,6 +905,7 @@ class SStateMirrors(SStateBase):
|
||||
self.fail("Did not find 'Sstate summary' line in bitbake output")
|
||||
|
||||
failed_urls = []
|
||||
failed_urls_extrainfo = []
|
||||
for l in output_l:
|
||||
if "SState: Unsuccessful fetch test for" in l and check_cdn:
|
||||
missing_object = l.split()[6]
|
||||
@@ -918,8 +919,11 @@ class SStateMirrors(SStateBase):
|
||||
else:
|
||||
missing_objects -= 1
|
||||
|
||||
self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}".format(missing_objects, "\n".join(failed_urls)))
|
||||
self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}".format("\n".join(failed_urls)))
|
||||
if "urlopen failed for" in l:
|
||||
failed_urls_extrainfo.append(l)
|
||||
|
||||
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)))
|
||||
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)))
|
||||
|
||||
def run_test(self, machine, targets, exceptions, check_cdn = True):
|
||||
# sstate is checked for existence of these, but they never get written out to begin with
|
||||
|
||||
Reference in New Issue
Block a user