diff options
author | Brad King <brad.king@kitware.com> | 2006-03-08 16:39:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-03-08 16:39:34 (GMT) |
commit | a155eacec38d3b326991dd32e07ec532dc0c36c0 (patch) | |
tree | 132140ddc67d004084c800900e718e84e291a802 /Source/kwsys/testProcess.c | |
parent | 3c39accee9593cc02d4fef2d612d9aef2681d3dc (diff) | |
download | CMake-a155eacec38d3b326991dd32e07ec532dc0c36c0.zip CMake-a155eacec38d3b326991dd32e07ec532dc0c36c0.tar.gz CMake-a155eacec38d3b326991dd32e07ec532dc0c36c0.tar.bz2 |
ENH: Added a way to quickly enable manual testing of grandchild killing.
Diffstat (limited to 'Source/kwsys/testProcess.c')
-rw-r--r-- | Source/kwsys/testProcess.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c index 96db251..36222b9 100644 --- a/Source/kwsys/testProcess.c +++ b/Source/kwsys/testProcess.c @@ -84,6 +84,14 @@ int test4(int argc, const char* argv[]) return 0; } +/* Quick hack to test grandchild killing. */ +/*#define TEST5_GRANDCHILD_KILL*/ +#ifdef TEST5_GRANDCHILD_KILL +# define TEST5_TIMEOUT 10 +#else +# define TEST5_TIMEOUT 30 +#endif + int test5(int argc, const char* argv[]) { int r; @@ -91,7 +99,11 @@ int test5(int argc, const char* argv[]) (void)argc; cmd[0] = argv[0]; cmd[1] = "run"; +#ifdef TEST5_GRANDCHILD_KILL + cmd[2] = "3"; +#else cmd[2] = "4"; +#endif cmd[3] = 0; fprintf(stdout, "Output on stdout before recursive test.\n"); fprintf(stderr, "Output on stderr before recursive test.\n"); @@ -377,7 +389,7 @@ int main(int argc, const char* argv[]) int values[7] = {0, 123, 1, 1, 0, 0, 0}; int outputs[7] = {1, 1, 1, 1, 1, 0, 1}; int delays[7] = {0, 0, 0, 0, 0, 1, 0}; - double timeouts[7] = {10, 10, 10, 10, 30, 10, -1}; + double timeouts[7] = {10, 10, 10, 10, TEST5_TIMEOUT, 10, -1}; int polls[7] = {0, 0, 0, 0, 0, 0, 1}; int repeat[7] = {2, 1, 1, 1, 1, 1, 1}; int r; |