diff options
Diffstat (limited to 'test-fixtures/test-utils.c')
-rw-r--r-- | test-fixtures/test-utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test-fixtures/test-utils.c b/test-fixtures/test-utils.c index 59e3fd8c..faa9e1f7 100644 --- a/test-fixtures/test-utils.c +++ b/test-fixtures/test-utils.c @@ -2,6 +2,10 @@ #include <stdlib.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #include "test-unit.h" #include "test-utils.h" @@ -146,6 +150,11 @@ test_utils_init (TestFlags requirement_flags, "$ make test-report"); counter++; +#ifdef HAVE_ALARM + /* Kill the test with SIGALRM if it takes more than this many seconds */ + alarm (120); +#endif + if (is_boolean_env_set ("COGL_TEST_VERBOSE") || is_boolean_env_set ("V")) cogl_test_is_verbose = TRUE; |