diff options
author | Paul Kunysch <kunysch@me.com> | 2013-03-05 23:14:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-03-22 13:02:12 (GMT) |
commit | 875eb8e158e9b8541b2efab09df44b32c6854f04 (patch) | |
tree | 82bed8297c805cfb51521cf9ea7d9bc8c23db613 /Tests/CTestTestFdSetSize/sleep.c | |
parent | 3ed2d03ee9ed9736656c8021e8f740540c9a2b7a (diff) | |
download | CMake-875eb8e158e9b8541b2efab09df44b32c6854f04.zip CMake-875eb8e158e9b8541b2efab09df44b32c6854f04.tar.gz CMake-875eb8e158e9b8541b2efab09df44b32c6854f04.tar.bz2 |
CTest: Add test for running many tests in parallel
In particular, this checks that CTest's use of select() has a sufficient
file descriptor set size limit (FD_SETSIZE) to handle many child
processes at the same time. Running 20 tests requires more than 64
descriptors, the Cygwin default that we override.
Diffstat (limited to 'Tests/CTestTestFdSetSize/sleep.c')
-rw-r--r-- | Tests/CTestTestFdSetSize/sleep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CTestTestFdSetSize/sleep.c b/Tests/CTestTestFdSetSize/sleep.c new file mode 100644 index 0000000..b2e6a87 --- /dev/null +++ b/Tests/CTestTestFdSetSize/sleep.c @@ -0,0 +1,16 @@ +#if defined(_WIN32) +# include <windows.h> +#else +# include <unistd.h> +#endif + +/* sleeps for 0.1 second */ +int main(int argc, char** argv) +{ +#if defined(_WIN32) + Sleep(100); +#else + usleep(100 * 1000); +#endif + return 0; +} |