This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check 'ulimit -v' before running the tests and refuse to run when too…
… low. 2009-04-28 Martin Baulig <martin@ximian.com> * build/ulimit-check.c: New helper program to check `ulimit -v'; we'll add more checks to it later. * build/runtests.in: Refuse the run the tests if `ulimit-check' fails. svn path=/trunk/debugger/; revision=132841
- Loading branch information
Martin Baulig
committed
Apr 28, 2009
1 parent
1d9441d
commit 4ca3a47
Showing
6 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ | |
/testrun.sum | ||
/testrun.log | ||
/cecil | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
/TestResult.log | ||
/TestResult.xml | ||
/runtests | ||
/ulimit-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
export LD_LIBRARY_PATH=@top_builddir@/backend/server/.libs:@top_builddir@/frontend/libedit/.libs:$LD_LIBRARY_PATH | ||
cd @top_builddir@/build && exec @MONO@ --debug=mdb-optimizations @NUNIT_CONSOLE_EXE@ @NUNIT_CONSOLE_FLAGS@ Mono.Debugger.Test.dll $* | ||
cd @top_builddir@/build && @top_builddir@/build/ulimit-check && exec @MONO@ --debug=mdb-optimizations @NUNIT_CONSOLE_EXE@ @NUNIT_CONSOLE_FLAGS@ Mono.Debugger.Test.dll $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <stdio.h> | ||
#include <sys/time.h> | ||
#include <sys/resource.h> | ||
|
||
#define VLIMIT_MINIMUM 1200000 | ||
|
||
int | ||
main (void) | ||
{ | ||
struct rlimit rlim; | ||
long vlimit; | ||
|
||
if (getrlimit (RLIMIT_AS, &rlim) != 0) { | ||
fprintf (stderr, "getrlimit (RLIMIT_AS) failed!\n"); | ||
return -1; | ||
} | ||
|
||
vlimit = rlim.rlim_cur / 1024; | ||
if (vlimit < VLIMIT_MINIMUM) { | ||
fprintf (stderr, "ERROR: 'ulimit -v' is too low, need a minimum of %ld kb.\n", VLIMIT_MINIMUM); | ||
return -1; | ||
} | ||
|
||
return 0; | ||
} |