]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/reproducible: Improve test output and ensure deb+ipk compared
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Feb 2020 23:39:29 +0000 (23:39 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Feb 2020 12:16:02 +0000 (12:16 +0000)
Adding newline characters between the packages in the failure output
massively improves readability.

Also ensure to output ipk failures when there are deb failures by
calling self.fail() at the end, else sometimes only partial differences
are returned.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/reproducible.py

index 04dc46f38a0e1fe17e04b144a97d25be5e711f67..f6433c9a02bcbecb1fe48de92d046e16418e446d 100644 (file)
@@ -185,6 +185,8 @@ class ReproducibleTests(OESelftestTestCase):
         # NOTE: The temp directories from the reproducible build are purposely
         # kept after the build so it can be diffed for debugging.
 
+        fails = []
+
         for c in self.package_classes:
             with self.subTest(package_class=c):
                 package_class = 'package_' + c
@@ -208,8 +210,11 @@ class ReproducibleTests(OESelftestTestCase):
                         self.copy_file(d.test, '/'.join([save_dir, d.test]))
 
                 if result.missing or result.different:
-                    self.fail("The following %s packages are missing or different: %s" %
-                            (c, ' '.join(r.test for r in (result.missing + result.different))))
+                    fails.append("The following %s packages are missing or different: %s" %
+                            (c, '\n'.join(r.test for r in (result.missing + result.different))))
+
+        if fails:
+            self.fail('\n'.join(fails))
 
         # Clean up empty directories
         if self.save_results: