diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-09-23 09:05:22 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-09-23 09:06:17 -0400 |
commit | fc240edcb482bc90f32ad8b89de9306ad8c7ea8a (patch) | |
tree | e4cf6e295d366c562ea433b8bae939a89f0d6171 | |
parent | c7fd029b1348c7de54ffa13befe4276c89d9e7a7 (diff) | |
download | gdk-pixbuf-fc240edcb482bc90f32ad8b89de9306ad8c7ea8a.tar.gz |
Further reduce pixbuf-randomly-modified test
In order to not have distcheck DOS my machine, reduce the number
of iterations to 1, and limit the amount of memory the test is
allowed to consume.
-rw-r--r-- | tests/pixbuf-randomly-modified.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c index 7aed9618b..2aa06ce75 100644 --- a/tests/pixbuf-randomly-modified.c +++ b/tests/pixbuf-randomly-modified.c @@ -25,6 +25,8 @@ #include <stdlib.h> #include <time.h> #include <string.h> +#include <sys/time.h> +#include <sys/resource.h> static void disaster (const char *what) @@ -102,13 +104,19 @@ main (int argc, char **argv) gboolean got_seed = FALSE; GPtrArray *files = g_ptr_array_new (); int l, iterations; + struct rlimit max_mem_size; + + max_mem_size.rlim_cur = 100 * 1024 * 1024; /* 100M */ + max_mem_size.rlim_max = max_mem_size.rlim_cur; + setrlimit (RLIMIT_DATA, &max_mem_size); + setrlimit (RLIMIT_AS, &max_mem_size); g_test_init (&argc, &argv, NULL); if (g_getenv ("ITERATIONS")) iterations = atoi (g_getenv ("ITERATIONS")); else - iterations = 10; + iterations = 1; seed = time (NULL); |