[Spice-devel] [PATCH spice-common] test-quic: Allows to specify multiple images to test
Frediano Ziglio
fziglio at redhat.com
Thu Jun 21 08:17:13 UTC 2018
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) {
+ 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
More information about the Spice-devel
mailing list