Re: [PATCH spice-common] test-quic: Allows to specify multiple images to test

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

 



On Thu, Jun 21, 2018 at 09:17:13AM +0100, Frediano Ziglio wrote:
> Make easier to test an entire set of files
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  tests/test-quic.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/test-quic.c b/tests/test-quic.c
> index 2a7ff3d..529a2e1 100644
> --- a/tests/test-quic.c
> +++ b/tests/test-quic.c
> @@ -232,12 +232,14 @@ static void test_pixbuf(GdkPixbuf *pixbuf)
>  
>  int main(int argc, char **argv)
>  {
> -    if (argc == 2) {
> +    if (argc >= 2) {
>          GdkPixbuf *source_pixbuf;
>  
> -        source_pixbuf = gdk_pixbuf_new_from_file(argv[1], NULL);
> -        test_pixbuf(source_pixbuf);
> -        g_object_unref(source_pixbuf);
> +        for (int i = 1; i < argc; ++i) {

Looks like you could move source_pixbuf declaration in that block.

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

> +            source_pixbuf = gdk_pixbuf_new_from_file(argv[i], NULL);
> +            test_pixbuf(source_pixbuf);
> +            g_object_unref(source_pixbuf);
> +        }
>      } else if (argc == 1) {
>          unsigned int count;
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]