Commit Graph

23 Commits

Author SHA1 Message Date
Bill Hoffman fde70a1b26 ctest: Add a new --repeat-until-fail option
This option tells ctest to run each test N times until the test fails or
the N times have run. This is useful for finding random failing tests.
2015-03-23 09:08:22 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -05:00
Brad King 5383657357 CTest: Avoid use of old EscapeSpaces method
Refactor how cmCTestMemCheckHandler computes the memory tester command
line options to avoid encoding them in a single string just to parse
them again.  The EscapeSpaces uses backslahes to escape spaces on UNIX
platforms, so replace other calls to it in CTest that are used to create
human-readable strings with simple double-quoting.
2010-08-18 10:14:09 -04:00
Zach Mullen 960dc2b10f Do not exit if stoptime is passed. 2010-06-15 10:29:35 -04:00
David Cole 003ffe5908 Fix intermingling of test environments when tests run in parallel.
The SaveRestoreEnvironment helper object makes sure that the
original environment is restored immediately after the
StartProcess call returns rather than waiting for the end
of the test. When tests are executed in parallel, there is
no guarantee about the ordering of EndTest calls relative
to StartTest calls. In fact, it would be odd for them to
be nested nicely. Therefore, to avoid the corruption of
the calling ctest's environment, the original environment
must be restored before ForkProcess returns.
2010-03-30 14:08:31 -04:00
Zach Mullen 0ba9d04117 Add the --stop-time argument
Unit test and script hook for STOP_TIME
2010-03-17 11:04:13 -04:00
Zach Mullen b4d27dc041 Use historical average of test times to schedule tests. 2010-02-26 11:02:05 -05:00
Zach Mullen ff916b48bd CTest output submitted to the dashboard is now compressed by default. 2009-12-17 11:14:49 -05:00
Zach Mullen 48b6133928 [0008668: CTest Dev: Missing executables shown as failed tests when using MPI.] Added a wrapping option to add_test so that exes built by the project can be safely wrapped in other exes and be listed as "not run" rather than "failed" if they are not built. 2009-12-10 14:38:32 -05:00
Zach Mullen b304186bc5 Match width of ctest "Start xx: " line to line up with the end test line 2009-10-05 10:20:52 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 6a7eae7184 Rewrite CTest child output handling
This commit fixes cmCTestRunTest and cmProcess to more efficiently
handle child output.  We now use the buffer for each child output pipe
to hold at most a partial line plus one new block of data at a time.
All complete lines are scanned in-place, and then only the partial line
at the end of the buffer is moved back to the beginning before appending
new data.

We also simplify the cmProcess interface by making GetNextOutputLine the
only method that needs to be called while the process is running.  This
simplifies cmCTestRunTest so that CheckOutput can be called until it
returns false when the process is done.
2009-09-11 12:26:41 -04:00
Brad King b6c26cded2 Initialize cmCTestRunTest instances robustly
All instances of this class need a cmCTestTestHandler, so we now require
one to construct it.  The instance also provides the cmCTest instance
too.
2009-09-11 10:09:48 -04:00
Zach Mullen 384f4d1f3f Fixed warning 2009-09-08 09:12:44 -04:00
Zach Mullen d4adde13d7 Allowed tests to pull more than one line of output in their quantum. Fixed uninitialized variables in the case that the test process could not start. 2009-09-03 15:33:44 -04:00
Zach Mullen 69fd641adb Fixed ctest output where max test index is not the same width as the total number of tests. Also some preliminary changes for batching ctest jobs 2009-09-02 10:08:40 -04:00
Zach Mullen 5a5cc52230 Fixed conversion warning on 64 bit machines 2009-08-31 09:50:35 -04:00
Zach Mullen b0b5ffcf5c MemCheck should now work again in ctest 2009-08-28 15:08:03 -04:00
Zach Mullen b427d1985e Added ctest -N test. Fixed ctest working directory bug. MemCheck fix coming soon... 2009-08-28 11:08:39 -04:00
Zach Mullen 177edc5ed1 Fixed ctest -N segfault issue. Further refactored ctest. Enabled failover for ctest 2009-08-27 10:37:30 -04:00
Zach Mullen 8ffd8d0a03 ENH: refactored ctest. All testing is now parallel. If no -j option is specified, defaults to a MP level of 1 (non parallel) 2009-08-26 12:09:06 -04:00
Zach Mullen b9daa192af ENH: Refactored CTest test execution code into an object 2009-08-19 08:58:36 -04:00