1: The CTestTestFailedSubmits tests do not need to run the
CTEST_MEMCHECK command. It is covered by the CTestTest2
test. If more coverage *is* required, choose a test that
runs by itself once to add it to... This one gets used
several times in a loop to test submission failure via
the various submission protocols. With memchecking on,
each test here takes 1000 seconds or more on a "fast"
build...
2: Other ctest tests do not need any of the CTEST_MEMORYCHECK_*
variables defined. They don't even call CTEST_MEMCHECK, or
-D NightlyMemCheck, or anything. So: remove the unnecessary
set calls.
3: CTestTest3 has gone intentionally unused for months because
it did not add any coverage and caused no ends of sporadic
randomish failures when network connectivity was spotty.
Remove its directory. Never add it again.
In this test we start up a cmake script that runs a process that sleeps,
and the timeout for the script is shorter than the sleep time. However,
in order to properly detect that the sleeping grandchild is killed when
the script times out we need to give sufficient time for the script to
start the grandchild. Otherwise the log file for the grandchild is not
available.
On some (cygwin) builds our previous 1 second timeout for the script was
not long enough to let the interpreter load and start the grandchild.
We make the timeout time configurable by setting CTestTestTimeout_TIME
in the cache for CMake itself. It tells the test how long to let the
script run. The grandchild always sleeps for 4 seconds longer to ensure
a comfortable window during which the process tree can be killed.