X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=test%2Fapi%2Ftestlib.c;h=3d1f743178fecd23be21221616fbad75d394c0fa;hp=aee77dc6b9e7c7e7ad6d30187be2adfa22dc8765;hb=47eeb5384a8fae8bcac8afb8a84782ca094683f9;hpb=5d3d666d4712604159141d991dadd3e6299565bd diff --git a/test/api/testlib.c b/test/api/testlib.c index aee77dc..3d1f743 100644 --- a/test/api/testlib.c +++ b/test/api/testlib.c @@ -1,4 +1,4 @@ -/* $Id: testlib.c,v 1.21 2005-05-31 07:22:20 adam Exp $ +/* $Id: testlib.c,v 1.23 2005-06-14 20:28:54 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -22,6 +22,16 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA /** testlib - utilities for the api tests */ +#if HAVE_SYS_TIME_H +#include +#endif +#if HAVE_SYS_RESOURCE_H +#include +#endif +#if HAVE_UNISTD_H +#include +#endif + #include #include #include @@ -59,6 +69,14 @@ void start_log(int argc, char **argv) */ ZebraService start_up(char *cfgname, int argc, char **argv) { +#if HAVE_SYS_RESOURCE_H +#if HAVE_SYS_TIME_H + struct rlimit rlim; + rlim.rlim_cur = 20; + rlim.rlim_max = 20; + setrlimit(RLIMIT_CPU, &rlim); +#endif +#endif nmem_init(); start_log(argc, argv); return start_service(cfgname);