summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-05-31 20:10:22 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-05-31 20:10:22 -0400
commit593a9061b715cd985d6ed6d52ee269be6785b198 (patch)
tree7099e9446fb88a2b9be78adab2fb1fa164cd23e4 /tests
parent9fa5a6c63f584b3813da2f04a31b63196a290b09 (diff)
downloadgdk-pixbuf-593a9061b715cd985d6ed6d52ee269be6785b198.tar.gz
Make this test silent by default
Diffstat (limited to 'tests')
-rw-r--r--tests/pixbuf-randomly-modified.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
index 3367e24af..83dd2ea70 100644
--- a/tests/pixbuf-randomly-modified.c
+++ b/tests/pixbuf-randomly-modified.c
@@ -33,6 +33,8 @@ disaster (const char *what)
exit (EXIT_FAILURE);
}
+static gint verbose;
+
static void
randomly_modify (const gchar *image, guint size)
{
@@ -132,7 +134,8 @@ main (int argc, char **argv)
g_random_set_seed (seed);
- g_print ("the last tested image is saved to pixbuf-randomly-modified-image\n");
+ if (verbose)
+ g_print ("the last tested image is saved to pixbuf-randomly-modified-image\n");
#if !GLIB_CHECK_VERSION (2, 35, 3)
g_type_init ();
@@ -149,13 +152,15 @@ main (int argc, char **argv)
fflush (stdout);
if (!g_file_get_contents (files->pdata[i], &contents, &size, &err))
{
- g_print ("%s: error: %s\n", (char *)files->pdata[i], err->message);
+ g_warning ("%s: error: %s\n", (char *)files->pdata[i], err->message);
}
else
{
- g_print ("%s\t\t", (char *)files->pdata[i]);
+ if (verbose)
+ g_print ("%s\t\t", (char *)files->pdata[i]);
randomly_modify (contents, size);
- g_print ("done\n");
+ if (verbose)
+ g_print ("done\n");
g_free (contents);
}