[gdk-pixbuf] Make this test silent by default
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Make this test silent by default
- Date: Sat, 1 Jun 2013 00:11:18 +0000 (UTC)
commit 593a9061b715cd985d6ed6d52ee269be6785b198
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 31 20:10:22 2013 -0400
Make this test silent by default
tests/pixbuf-randomly-modified.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
index 3367e24..83dd2ea 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);
}
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]