[OE-core] [PATCH 2/6] oeqa/reproducible: Improve test output and ensure deb+ipk compared

Joshua Watt jpewhacker at gmail.com
Wed Feb 5 13:49:24 UTC 2020


On Wed, Feb 5, 2020, 6:12 AM Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:

> 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 at linuxfoundation.org>
> ---
>  meta/lib/oeqa/selftest/cases/reproducible.py | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py
> b/meta/lib/oeqa/selftest/cases/reproducible.py
> index 04dc46f38a0..f6433c9a02b 100644
> --- a/meta/lib/oeqa/selftest/cases/reproducible.py
> +++ b/meta/lib/oeqa/selftest/cases/reproducible.py
> @@ -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):
>

It too bad subtests are broken. If we can't handle failed subtests, we can
remove this line that creates the subtest in the first place.

                 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:
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20200205/4d251fef/attachment.html>


More information about the Openembedded-core mailing list