[Spice-devel] [PATCH spice-common] test-quic: Allows to specify multiple images to test
Christophe Fergeau
cfergeau at redhat.com
Tue Jun 26 09:40:53 UTC 2018
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 at redhat.com>
> ---
> 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 at redhat.com>
> + 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180626/1e4ccb53/attachment.sig>
More information about the Spice-devel
mailing list