Re: [PATCH] Enhance test-isodetect: continue after failure

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

 



On Mon, Oct 15, 2018 at 07:43:59PM +0200, Věra Cholasta wrote:
> ---
>  tests/test-isodetect.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/test-isodetect.c b/tests/test-isodetect.c
> index 76f0c5a..f40f5cc 100644
> --- a/tests/test-isodetect.c
> +++ b/tests/test-isodetect.c
> @@ -390,17 +390,16 @@ static void test_one(const gchar *vendor)
>  
>      g_assert_nonnull(isos);
>  
> -    tmp = isos;
> -    while (tmp) {
> +    for (tmp = isos; tmp; tmp = tmp->next) {
>          struct ISOInfo *info  = tmp->data;
>          gboolean matched = osinfo_db_identify_media(db, info->media);
>          OsinfoOs *os;
>  
>          g_test_message("checking OS %s for ISO %s",
>                         info->shortid, info->filename);
> +        g_assert_true(matched);
>          if (!matched) {
> -            g_error("ISO %s was not matched by OS %s",
> -                    info->filename, info->shortid);
> +            continue;

You've removed the message that tells us what actually failed.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

_______________________________________________
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