Commit Graph

867 Commits

Author SHA1 Message Date
Brad King 0554e5e50f Merge topic 'ctest-remove-trailing-whitespace'
a1711f1 Remove trailing whitespace
2011-03-15 14:47:57 -04:00
Brad King a1711f1c6b Remove trailing whitespace 2011-03-11 08:04:58 -05:00
Brad King 732af7fbba CTest: Do not fail with submodules and Git < 1.6.5.0
Several major Linux distributions still do not provide Git >= 1.6.5.0 in
their stable package lists.  Prior to commit 1173cc4a (Update Git
submodules with --recursive, 2011-02-22) CTest was able to use older Git
versions but simply silently failed to update submodules recursively.
Instead of failing with older Git versions preserve the status quo and
add a warning in the update log.  Users testing projects with recursive
submodules may simply update to a Git new enough to support them.
2011-03-10 13:57:30 -05:00
Brad King 1173cc4ab2 CTest: Update Git submodules with --recursive
Fail if submodules exist and the git version is less than 1.6.5.0.

Inspired-by: Johan Björk <phb@spotify.com>
2011-02-22 15:47:50 -05:00
Brad King 6dc8c25226 Merge topic 'fix-11877-sort-tests-correctly'
8af8eab Use stable_sort to preserve test order (#11877)
2011-02-22 14:32:43 -05:00
David Cole 8af8eab7a4 Use stable_sort to preserve test order (#11877)
Using sort results in a possibly-modified sorting
when all elements are "tied" - use stable_sort instead
to preserve the original ordering of tied elements.
2011-02-18 13:10:26 -05:00
Marco Craveiro 6e02a3b2bf CTest: Use the gcov --preserve-paths flag (#11717)
To avoid name clashes.

Before this commit, name clashes can occur when invoking gcov on a
project that uses the same file name in different directories. The
--preserve-paths flag ensures all file names have a complete path,
avoiding name clashes.
2011-02-09 16:04:15 -05:00
Brad King 3ef8929ee6 Merge topic 'ctest-launch-empty-rule'
6228abe CTest: Teach launcher to ignore empty/no-op make commands
2011-01-11 15:53:28 -05:00
Brad King 984ca06a8e Merge topic 'improve-build-error-detection'
89eb4bf Improve build error detection.
2011-01-11 15:49:29 -05:00
Brad King 333e707d95 Merge topic 'fix-test-output-truncation'
e73bf1c CTest: Do not truncate UTF-8 test output too early (#10656)
2011-01-11 15:49:04 -05:00
Chuck Atkins 6228abed9b CTest: Teach launcher to ignore empty/no-op make commands 2011-01-10 10:17:13 -05:00
David Cole 89eb4bf356 Improve build error detection.
Some were missed recently on a failed dashboard build
of ccmake on an HP-UX machine.
2011-01-05 16:13:55 -05:00
Brad King d04e10dd7e Merge topic 'negative-test-costs'
6b0c7de Support explicitly set test costs in non-parallel testing.
2011-01-04 15:46:16 -05:00
Brad King e73bf1c384 CTest: Do not truncate UTF-8 test output too early (#10656)
Since commit e4beefeb (CTest: Do not munge UTF-8 output in XML files,
2009-12-08) we validate UTF-8 encoding of build and test output as it is
written to XML files.  However, in cmCTestTestHandler::CleanTestOutput
we still processed test output one byte at a time and did not recognize
multi-byte UTF-8 characters.  Presence of such characters caused early
truncation.

Teach CleanTestOutput to truncate test output at the limit but without
cutting it in the middle of a multi-byte encoding.  Also, stop avoiding
truncation in the middle of an XML tag like "<MyElement>" because the
'<' and '>' will be properly escaped in the generated XML anyway.
2011-01-04 13:20:49 -05:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -05:00
Zach Mullen 6b0c7ded57 Support explicitly set test costs in non-parallel testing. 2011-01-03 11:25:46 -05:00
Brad King 97c5171d6c Merge topic 'dev/add_test-working-directory'
667a90a Fix sentence break in add_test documentation
96309fc Make TestsWorkingDirectory test a C file
a4a5e37 Use iostream to make Borland happy
cfe53cd Fully specify the path to old-signature add_test
017d4e9 Group adding tests with its properties
561cc33 Only test the default cwd with Makefiles
d87bae7 Simplify the _default_cwd derivation
992c74f Use --><-- markers to denote the path
5249551 Flip slashes around on Windows
0a014da Add ctype.h include for toupper()
af12f83 Fix header includes for C++ and Visual Studio
5597aa2 Rename the project to match the test
9bf4165 Add tests for WORKING_DIRECTORY arg to add_test
42de5d0 Add WORKING_DIRECTORY argument to add_test
7679f9f Rename WorkingDirectory test
d95f817 Add the WORKING_DIRECTORY property to tests
2010-12-28 15:25:49 -05:00
Brad King ea38628366 Merge topic 'ctest-git-send-committer'
5992526 CTest: Factor out duplicate Git author/committer code
307b8a6 CTest git update should pass the committer as well as the author
2010-12-21 14:02:39 -05:00
Brad King c85b8189cf Merge topic 'fix-11487-multiple-test-calls'
744366f CTest: multiple ctest_test calls w/LABEL regexs (#11487)
2010-12-21 14:00:56 -05:00
Brad King 5992526482 CTest: Factor out duplicate Git author/committer code
Factor out date/time format code into FormatDateTime function instead of
duplicating it.
2010-12-20 17:16:25 -05:00
Zach Mullen 307b8a6e69 CTest git update should pass the committer as well as the author 2010-12-20 16:05:40 -05:00
Clinton Stimpson 744366fc0b CTest: multiple ctest_test calls w/LABEL regexs (#11487)
The Initialize method was not re-initializing everything
that it should have been. This commit fixes that.
2010-12-17 17:30:13 -05:00
Rolf Eike Beer d95f817f77 Add the WORKING_DIRECTORY property to tests 2010-12-16 16:23:18 -05:00
Brad King 1f7133cd61 CTest: Fix line-too-long style in DEPEND cycle error 2010-12-16 08:07:43 -05:00
Brad King f48d3bc5ba CTest: Fix test DEPEND cycle detection
A cycle exists when the DFS returns to the root node, not just when
multiple paths lead to the same node.

Inspired-By: Alexander Esilevich <aesilevich@pathscale.com>
2010-12-15 16:49:34 -05:00
Brad King 7145ca67fc CTest: Fix ctest_sleep documentation (#11554)
Document behavior consistently with the implementation.
2010-12-09 10:37:28 -05:00
Zach Mullen 13f24540ad Remove debugging message from parallel ctest 2010-12-01 11:28:23 -05:00
Bill Hoffman 3f94c7cc39 When processing DartMeasurements use the tests working directory.
Restore CMake 2.6 behavoir where the dart processing apparently was run from within the tests directory instead of the root of the build tree. This addresses issue reported on the VTK Dashboard where the Testing/Temporary directory is defined as ../../../Testing/Temporary but the DartProcessing is run with respect to the root of the build tree. This causes the regression/difference images to not be located by ctest and thus not uploaded to the dashboard.
2010-10-19 16:15:32 -04:00
Zach Mullen 32242affea Added CTest command --print-labels
This command allows a user to quickly see the list of all available
test labels.  The labels are also printed in verbose show only mode,
alongside their corresponding tests.
2010-08-31 10:41:23 -04: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
Brad King e6067ca969 Merge topic 'ctest-git-flexibility'
a7319cf ctest_update: Run 'git submodule' at top level
7bf8dc1 ctest_update: Support ".git file" work trees
65cb72f ctest_update: Abort if Git FETCH_HEAD has no candidates
2010-08-03 16:07:31 -04:00
Brad King a7319cf1c1 ctest_update: Run 'git submodule' at top level
The git submodule porcelain must be executed from the top level of the
work tree.  Use 'git rev-parse --show-cdup' to find the top level
relative to the source tree.  This is better than searching up the tree
for .git ourselves because it will always work the same way Git does and
thus honors settings like GIT_DISCOVERY_ACROSS_FILESYSTEM.
2010-07-27 11:31:59 -04:00
Brad King 7bf8dc1ac9 ctest_update: Support ".git file" work trees
Commit c3781efb (Support Git upstream branch rewrites, 2010-06-08)
assumed that ".git/FETCH_HEAD" exists inside the source tree.  Fix the
implementation to handle a work tree using a ".git file" to link to its
repository.  Use "git rev-parse --git-dir" to locate the real .git dir.
2010-07-26 11:40:20 -04:00
Brad King 65cb72f758 ctest_update: Abort if Git FETCH_HEAD has no candidates
If .git/FETCH_HEAD provides no merge candidate do not attempt to update.
Also log FETCH_HEAD lines as we parse them since they are essentially
output from the git fetch command.
2010-07-20 16:57:50 -04:00
Brad King e1a4c02bac Merge topic 'resolve/doc-spelling/CPackRPM'
7739d78 Merge CPackRPM changes into doc-spelling
9203e91 Fix spelling errors reported by Lintian.
2010-07-20 16:00:29 -04:00
Brad King f7a0386fc5 Merge topic 'resolve/ctest-file-checksum/remove-CTestTest3'
38c762c Merge 'remove-CTestTest3' into ctest-file-checksum
46df0b4 Activate retry code on any curl submit failure.
8705497 Checksum test should use CMAKE_TESTS_CDASH_SERVER
d0d1cdd Mock checksum failure output for old CDash versions
af5ef0c Testing for CTest checksum
86e81b5 CTest should resubmit in the checksum failed case
d6b7107 Fix subscript out of range crash
082c87e Cross-platform fixes for checksum/retry code
e525649 Checksums on CTest submit files, and retry timed out submissions.
2010-07-13 17:05:33 -04:00
Brad King 38c762c728 Merge 'remove-CTestTest3' into ctest-file-checksum
Conflicts:
	Tests/CMakeLists.txt
2010-07-13 17:01:39 -04:00
Brad King a570ba6df7 Merge topic 'external-project-launcher'
b2634b6 Detect CMake warnings and errors in build output.
012c986 ExternalProject: Add LOG_* options to hide step output
2010-07-13 14:58:11 -04:00
Brad King 7739d786a4 Merge CPackRPM changes into doc-spelling
Conflicts:
	Modules/CPackRPM.cmake
2010-07-13 09:46:52 -04:00
Kai Wasserbäch 9203e9187e Fix spelling errors reported by Lintian.
During a Lintian run on the binary packages of CMake in Debian I was
notified of many spelling mistakes.
2010-07-13 09:41:37 -04:00
David Cole 46df0b44ac Activate retry code on any curl submit failure.
Previously, we were only going into the retry block
for time out conditions. But a "could not connect"
response, or really any sort of curl failure, is
also a condition where we should retry the submit
if the user has requested a retry.
2010-07-12 16:48:38 -04:00
David Cole b2634b6aa3 Detect CMake warnings and errors in build output.
Fix niggly in ExternalProject that would inadvertently
create a log file of output when a command was explicitly
set to the empty string.

Also, increase the default value for showing context
around build errors to 10 lines, up from 6. Also add
the ability to customize this setting so that users
can put it back to 6 or even lower if they want, or
show more if they want.
2010-07-10 15:04:31 -04:00
Brad King 28a16d1cc4 Merge branch 'improve-test-cost-sorting' 2010-07-06 10:24:31 -04:00
Zach Mullen 142edf8ad4 More robust cost-based scheduling impl 2010-07-01 14:10:49 -04:00
Zach Mullen 3e52000a07 Fix cycle detection for test dependencies 2010-06-30 10:39:17 -04:00
David Cole 415900ba77 Eliminate -Wconversion warnings.
Change types of local variables, or casting, or re-arrange
expressions to get rid of "conversion may alter value" warnings
as seen on recent dashboard submissions from londinium.kitware.
2010-06-27 11:22:05 -04:00
Brad King 566bb2d078 Merge branch 'ctest-git-empty-commits' 2010-06-24 10:41:20 -04:00
Brad King 5890f562e3 Merge branch 'fix-ctest-parallel' 2010-06-24 10:40:19 -04:00
Brad King 73144a8f1c Merge branch 'fix_ctest_failure_code' 2010-06-24 10:35:10 -04:00
Zach Mullen 1a4c0c55c7 Parallel CTest hangs if serial test has depends 2010-06-23 17:18:59 -04:00
Brad King bbfe241c6a CTest: Parse empty Git commits correctly
Git's diff-tree format has no '\n'-terminated blank line at the end of
its commit message body block if there are no diff lines.  Instead the
message body is terminated by '\0' and there is no diff section.  Teach
CTest to parse the format in this case.
2010-06-23 09:14:43 -04:00
Brad King 0336d822cc Merge branch 'doc_ctest_build_target' 2010-06-22 09:56:53 -04:00
Brad King 3efb7f34a4 Merge branch 'fix-stoptime-mem-leak' 2010-06-22 09:56:39 -04:00
Bill Hoffman 8f8c1edca2 Fix for bug #10859, ctest exit exception incorrectly reported.
CTest was using the return value from the program instead of the
exit exception value for the process.
2010-06-22 09:55:09 -04:00
Brad King b4aa834900 Merge branch 'ctest-git-flexibility' 2010-06-15 14:10:41 -04:00
Zach Mullen 6e7f182318 Document ctest_build() TARGET option 2010-06-15 10:43:30 -04:00
Zach Mullen 960dc2b10f Do not exit if stoptime is passed. 2010-06-15 10:29:35 -04:00
Zach Mullen 9d6567a269 Extra coverage glob should subtract the explicitly defined excluded files 2010-06-11 14:17:00 -04:00
Zach Mullen d0d1cdd71b Mock checksum failure output for old CDash versions 2010-06-10 15:02:24 -04:00
Zach Mullen af5ef0c969 Testing for CTest checksum 2010-06-10 12:25:49 -04:00
Brad King c3781efb28 ctest_update: Support Git upstream branch rewrites
Use 'git fetch' followed by 'git reset' to update the source tree.  This
is better than 'git pull' because it can handle a rewritten upstream
branch and does not leave local modifications.  After fetch, parse
FETCH_HEAD to find the merge head that 'git pull' would choose to track
the upstream branch.  Then reset to the selected head.

In the normal fast-forward case the behavior remains unchanged.
However, now local modifications and commits will be erased, and
upstream rewrites are handled smoothly.  This ensures that the upstream
branch is tested as expected.
2010-06-08 16:50:17 -04:00
Brad King 2eae651acc ctest_update: Support custom Git update command
Define CTest configuration variable CTEST_GIT_UPDATE_CUSTOM to set a
custom command line for updating Git-managed source trees.
2010-06-08 16:12:28 -04:00
Brad King 608406bf55 Merge branch 'ctest-update-git-submodule' 2010-06-07 14:34:28 -04:00
Brad King cbd0fa3013 Merge branch 'php-coverage' 2010-06-07 14:19:56 -04:00
Zach Mullen 86e81b53c1 CTest should resubmit in the checksum failed case 2010-06-05 10:36:23 -04:00
Brad King d0a1b9efd0 Fix ctest_update log prefix for git submodule update
Commit 67277bac (Teach ctest_update about Git submodules, 2010-05-04)
accidentally logged "git submodule update" with the prefixes "pull-out"
and "pull-err".  Fix it to use "submodule-out" and "submodule-err"
instead.
2010-06-04 17:01:23 -04:00
Zach Mullen d6b71078da Fix subscript out of range crash 2010-06-03 13:52:48 -04:00
Zach Mullen 082c87e528 Cross-platform fixes for checksum/retry code 2010-06-03 13:27:26 -04:00
Zach Mullen e525649a4e Checksums on CTest submit files, and retry timed out submissions. 2010-06-03 10:34:34 -04:00
Bill Hoffman 1d4e121d9c Add php coverage to ctest. 2010-05-25 09:23:25 -04:00
Zach Mullen fa3c1817b1 Cost-based test scheduling should only be done in parallel mode. 2010-05-19 11:20:30 -04:00
Zach Mullen 38cabcd9ff Fix shadowed local warning in coverage handler 2010-05-12 09:37:43 -04:00
Zach Mullen 231cbbef80 Change coverage globbing mechanism to resolve paths earlier 2010-05-07 11:00:21 -04:00
Brad King 678073bec2 CTest: Submit author email in Update.xml
Add the <Email>...</Email> element in Update.xml for each commit
reported.  This field was defined by Dart but never really used.
Distributed version control systems use author name and email
instead of a user id, so now it makes sense to use this field.
2010-05-07 09:17:26 -04:00
Brad King 67277bacca Teach ctest_update about Git submodules
Git does not automatically checkout the matching version of a submodule
when it checks out a new version of the parent project in the work tree.
If the submodule reference changed in the parent project then we were
reporting the submodule path as a local modification.  Work around the
problem in ctest_update using "git submodule update" after "git pull".
For projects with no submodules this is a no-op.  See issue #10662.
Also add a submodule to the test project for CTest.UpdateGIT to test the
work-around.
2010-05-04 09:40:04 -04:00
Bill Hoffman fd5b75e3f4 Fix for for bug #10550, fix some errors for an old Sun compiler. 2010-04-28 17:52:46 -04:00
Brad King 1da611fd46 ctest_update: Report failure in Update.xml
Report in <UpdateReturnStatus> when the update command line returns
non-zero.  Otherwise the failure may be silently ignored since the error
was previously recorded only in the local log file.
2010-04-27 14:10:47 -04:00
Zach Mullen 6ea9213244 Coverage glob should search in Source dir 2010-04-23 11:22:54 -04:00
Zach Mullen 7049dff85a Implement extra coverage globbing 2010-04-23 09:20:53 -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 4b32ee01f2 Better detection of stop_time being passed. 2010-03-19 09:09:02 -04:00
Zach Mullen 9eea95c90f Fix StopTime to also account for localtime being a day ahead of gmtime 2010-03-18 14:48:42 -04:00
Zach Mullen 9676c52c3e Fix for StopTime for cases when gmtime is a day ahead of localtime 2010-03-18 13:53:40 -04:00
Zach Mullen a2fe175647 More debugging of StopTime test 2010-03-18 10:29:02 -04:00
Zach Mullen 0d48f81d32 Test using std::min 2010-03-17 12:12:04 -04:00
Zach Mullen 4c59570bfb Replace min() call with its literal definition 2010-03-17 12:07:10 -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 2fd9b8072b Add unit test for RESOURCE_LOCK test property 2010-03-03 10:33:09 -05:00
Zach Mullen 767ffba8ff Added RESOURCE_LOCK test property. 2010-03-02 15:38:02 -05:00
Zach Mullen 5cfbdb1f80 Close ifstream. 2010-03-01 12:05:58 -05:00
Zach Mullen 348f6c4d8c If tests failed on the last run, have them run first next time 2010-03-01 11:59:00 -05:00
Zach Mullen 09e748c69a Configurable path to CTest cost data file
Allow the user to set the CMake variable CTEST_COST_DATA_FILE, which will be used to store the cost data from test runs.  If not set, defaults to the original location in the build tree Testing/Temporary dir.
2010-03-01 11:06:28 -05:00
Zach Mullen b4d27dc041 Use historical average of test times to schedule tests. 2010-02-26 11:02:05 -05:00
Zach Mullen 57efb4a497 BUG: We shouldn't be setting the HideWindow option on the test processes we create. 2010-02-19 13:28:04 -05:00
David Cole 90f6a7270a Fix for fix for issue #2336 - do not specify CMAKE_BUILD_TYPE when the ctest -C configuration type string is empty. 2010-02-10 14:47:21 -05:00
Brad King 8bd231866a cmCTestGIT: Refresh index for local modifications
We use 'git diff-index' to detect local modifications after pull.  On
some filesystems the work tree timestamps of a few files may be dated
after the index, making them appear as locally modified.  We address the
problem by using 'git update-index --refresh' to refresh the index and
avoid false local modifications.
2010-02-09 13:31:32 -05:00
Brad King 2ec78b4de7 cmCTestBZR: Strip trailing slashes from paths
Our internal path processing methods assume no trailing slashes, but bzr
adds trailing slashes to updated directories.  This can lead to empty
entries in Update.xml files.  We address the problem by stripping the
slashes as soon as they are parsed.
2010-02-09 13:31:12 -05:00
Zach Mullen a0cc49a915 Support for relative paths to executables in MemCheck tests. Also fixed a bug causing memcheck args to be overwritten repetitively. 2010-02-04 11:24:57 -05:00
Zach Mullen c87282ce52 Re-enabled Scheduler test and fixed the underlying problem. 2010-02-03 16:32:26 -05:00
David Cole b0d5fa0bc7 Fix for issue #5041 - improve error messages that may occur during ctest_build and ctest_configure.
The improved text gives very clear information when either the CMakeLists.txt or CTestConfig.cmake file is missing. Hopefully, it makes it easier for those poor future souls who encounter these messages to solve their problems quickly.
2009-12-29 18:03:45 -05:00