Re: [PATCH 2/2] test-isodetect: continue after failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 17, 2018 at 8:11 PM Věra Cholasta <vbudikov@xxxxxxxxxx> wrote:
>
> ---
>  configure.ac           | 4 ++--
>  tests/test-isodetect.c | 7 +++++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 2e62955..00547a5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -37,8 +37,8 @@ m4_if(m4_version_compare([2.61a.100],
>  m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
>
>  # Keep these two definitions in agreement.
> -GLIB_MINIMUM_VERSION="2.36"
> -GLIB_ENCODED_VERSION="GLIB_VERSION_2_36"
> +GLIB_MINIMUM_VERSION="2.38"
> +GLIB_ENCODED_VERSION="GLIB_VERSION_2_38"
>
>  PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.6.0])
>  PKG_CHECK_MODULES([LIBXSLT], [libxslt >= 1.0.0])
> diff --git a/tests/test-isodetect.c b/tests/test-isodetect.c
> index c1833ae..6a4a2ba 100644
> --- a/tests/test-isodetect.c
> +++ b/tests/test-isodetect.c
> @@ -398,8 +398,10 @@ static void test_one(const gchar *vendor)
>          g_test_message("checking OS %s for ISO %s",
>                         info->shortid, info->filename);
>          if (!matched) {
> -            g_error("ISO %s was not matched by OS %s",
> -                    info->filename, info->shortid);
> +            g_printerr("ISO %s was not matched by OS %s\n/isodetect/%s: ",
> +                       info->filename, info->shortid, vendor);
> +            g_test_fail();
> +            continue;
>          }
>
>          g_object_get(info->media, "os", &os, NULL);
> @@ -419,6 +421,7 @@ int
>  main(int argc, char *argv[])
>  {
>      g_test_init(&argc, &argv, NULL);
> +    g_test_set_nonfatal_assertions();
>
>      GList *vendors = load_vendors(NULL);
>      GList *it;
> --
> 1.8.3.1
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libosinfo

Reviewed-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>

Věra,

I see those 2 patches as the first step of a bigger work, as Cole
mentioned in the bugzilla you've opened about this issue.

AFAIU, pretty much all other tests would benefit of similar changes.
Would you be willing to work on that?

Apart from that, do you mind if I add the reference to the bugzilla
you've opened in the commit message before I push those patches?

Thanks for the contribution,
..
Fabiano Fidêncio

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux