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
Brad King
b41a548d86
Add parentheses around '&&' between '||' for gcc
...
The GNU compiler warns about possible operator precedence mistakes and
asks for explicit parentheses (-Wparentheses). We add the parentheses
to silence the warning. This also fixes one real logic error in the
find_package() implementation by correcting expression evaluation order.
2009-09-11 08:18:15 -04:00
Zach Mullen
c57fb18920
Added some ctest batch capabilities
2009-09-10 11:18:05 -04:00
Zach Mullen
4b4e801eba
BUG: Fixed segfault and bad reporting if a ctest executable could not be found. Also added some batch testing code that is not yet complete.
2009-09-10 11:16:08 -04:00
Zach Mullen
a516040579
ENH: ctest now writes time cost data to a file after a test set is run, and uses these time costs to schedule the processes the next time ctest is run in that build tree.
2009-09-08 17:10:35 -04:00
Zach Mullen
6727834a8c
BUG: Fixed extraneous newlines from ctest process output
2009-09-08 14:48:23 -04:00
Zach Mullen
39e5f9d963
ENH: Replaced the EXPENSIVE test property with a COST test property taking a floating point value. Tests are now started in descending order of their cost, which defaults to 0 if none is specified.
2009-09-08 13:39:13 -04:00
Zach Mullen
a02ef56401
BUG: Fixed issue where ctest would hang if a process terminated with output in its buffers but no newline
2009-09-08 10:16:16 -04:00
Zach Mullen
384f4d1f3f
Fixed warning
2009-09-08 09:12:44 -04:00
Zach Mullen
5fb958fde9
ENH: Added ctest test options PROCESSORS and RUN_SERIAL. These allow specification of resource allocation for given tests running with the ctest -j N option. RUN_SERIAL ensures that a given test does not run in parallel with any other test. Also forced appending of "..." to the longest test name in ctest.
2009-09-07 10:26:17 -04:00
Bill Hoffman
cdb966532b
Fix memory and process leak in ctest_run_script.
2009-09-04 17:01:47 -04:00
David Cole
68b8332088
Increase curl submit timeout. A submit will timeout if there are 120 seconds of very little activity. 30 seconds was too short.
2009-09-04 14:00:26 -04:00
Zach Mullen
5517e17bf9
Fixed ctest output processing. Should now display output as it occurs, as well as be able to consume multiple lines if they exist within the timeout.
2009-09-04 13:50:06 -04:00
Bill Hoffman
7d190a65ca
Change run_ctest_script in ctest to not stop processing when there is an error in the script being run. Also, add a RETURN_VALUE option so that you can find out if the script failed
2009-09-04 13:24:25 -04:00
Zach Mullen
7f9a0f508f
Fixed output as-it-happens issue. Now displays output as it receives each newline.
2009-09-04 11:23:38 -04:00
Zach Mullen
c6e5dd21fd
Added the test property EXPENSIVE, which denotes that the given test(s) should be started prior to tests that are not marked as such. Also fixed test dependencies, and a few uninitialized variables in cmProcess.
2009-09-04 10:16:06 -04:00
Zach Mullen
7f6ff73396
Fixed 2 unused variable warnings
2009-09-03 15:50:47 -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
20713ab89d
Fixed warnings
2009-09-03 11:14:13 -04:00
Zach Mullen
659171d1f7
ENH: Added PARALLEL_LEVEL option for ctest_memcheck(). Added PROCESSORS option to set_tests_properties (implementation to come).
2009-09-03 10:47:14 -04:00
Zach Mullen
c5cf9b0e5f
STYLE: line length
2009-09-02 16:32:43 -04:00
Zach Mullen
7e20db0224
ENH: Added PARALLEL_LEVEL option to ctest_test() command.
2009-09-02 12:35:42 -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
David Cole
d741a6a57f
Add curl timeout options to the SubmitUsingHTTP method. They were only in the SubmitUsingFTP method.
2009-09-01 17:23:50 -04:00
Zach Mullen
90cc5c5e04
ENH: Improved test reporting output
2009-09-01 11:58:04 -04:00
Zach Mullen
6d0b6f2b9e
Fixed ctest_memcheck docs ( http://www.cmake.org/Bug/view.php?id=9242 )
2009-08-31 11:32:39 -04:00
Zach Mullen
59b34a6a1a
Fixed Dart time recording for ctest
2009-08-31 10:28:39 -04:00
Zach Mullen
5a5cc52230
Fixed conversion warning on 64 bit machines
2009-08-31 09:50:35 -04:00
Zach Mullen
387ba0c646
Fixed line length issue
2009-08-30 10:57:30 -04:00
Zach Mullen
b0b5ffcf5c
MemCheck should now work again in ctest
2009-08-28 15:08:03 -04:00
Zach Mullen
996bb51a1d
Replaced std::stringstream with cmOStringStream
2009-08-28 11:40:34 -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
8c6aa445a2
Fixed line length over 80
2009-08-20 09:46:43 -04:00
Zach Mullen
a2ef34d344
Fixed overwriting of a previous change set
2009-08-19 09:24:55 -04:00
Zach Mullen
b9daa192af
ENH: Refactored CTest test execution code into an object
2009-08-19 08:58:36 -04:00
Bill Hoffman
c02c8c287c
Add test times to log file as well as the stdout.
2009-08-18 14:03:50 -04:00
Bill Hoffman
3c34d0440c
If labels are found on the tests, then print a time summary for all the tests run with each label.
2009-08-18 13:34:05 -04:00
Brad King
dd2cf7388b
Fix classification of externals in svn status
...
CTest runs 'svn status' to identify modified and conflicting files in
the working directory. This commit fixes the interpretation of the 'X'
status, which corresponds to svn eXternals. This status should be
ignored rather than treated as a local modification.
2009-08-12 08:06:57 -04:00
Bill Hoffman
a696fe8183
Output total time when using -j N
2009-08-11 22:02:49 -04:00
Bill Hoffman
a86df0251f
Fix failing test on release build for VS 10 cmSystemTools::GetLineFromStream crashes if the stream is not open in that case.
2009-08-11 16:25:56 -04:00
Brad King
a48f29c904
Set current directory variables in CTest scripts
...
The commit "Fix get_filename_component ABSOLUTE mode" broke the code
get_filename_component(cwd . ABSOLUTE)
because CTest scripts did not make cmMakefile::GetCurrentDirectory()
available. This commit fixes the problem by setting the proper
information on CTest script instances of cmMakefile.
This also makes CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR
available to CTest scripts. They are set to the working directory at
script startup.
2009-07-31 09:19:19 -04:00
Brad King
e9d7ebb3ec
BUG: Do not double-initialize local generators
...
All global generator CreateLocalGenerator methods automatically
initialize the local generator instances with SetGlobalGenerator. In
several places we were calling SetGlobalGenerator again after receiving
the return value from CreateLocalGenerator. The double-initializations
leaked the resources allocated by the first call to SetGlobalGenerator.
This fix removes the unnecessary calls.
2009-07-28 10:47:02 -04:00
Bill Hoffman
40850e7f1f
ENH: add test times and a total time to the output of command line ctest
2009-07-27 14:17:38 -04:00
Bill Hoffman
a5b06dcbb6
ENH: fix warning
2009-07-19 13:40:38 -04:00
Bill Hoffman
eb5d0a7f61
ENH: fix warning
2009-07-17 16:15:11 -04:00
Bill Hoffman
3250cb3d3b
ENH: compute the max test name width based on the length of the tests
2009-07-17 10:06:38 -04:00
Alexander Neundorf
7048373296
STYLE: don't load CMakeDetermineSystem and CMakeSystemSpecific directly from
...
cmCTestScriptHandler, but have it load the new script CTestScriptMode.cmake
-> that makes it more flexible, also add a simple test that the system name
has been determined correctly
Alex
2009-07-12 04:51:51 -04:00