Commit Graph

75 Commits

Author SHA1 Message Date
Zach Mullen 874fdd914a CTest: Output test-specific env vars in verbose mode (#15446)
Any environment vars that were configured for a test via the
ENVIRONMENT property will now be output when the test is run
with verbose logging enabled.
2015-03-17 10:11:33 -04:00
Zack Galbreath 0b87b2a339 ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
Stephen Kelly fd7b371293 Replace foo.size() pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly d92887efab Replace 'foo.size() > 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly 931e055d8c Port all cmOStringStream to std::ostringstream.
All compilers hosting CMake support the std class.
2015-01-11 17:06:03 +01:00
Brad King 0bdd4ebfb8 cmCTest: Use size_t for cmsysBase64_Encode return value 2014-12-26 16:23:35 +01:00
Nils Gladitz cc1139cc30 strings: Remove redundant calls to std::string::c_str()
Replacements were detected and performed by the clang tool
remove-cstr-calls on a linux build.
2014-10-15 14:54:05 +02:00
Bill Hoffman 49948f7221 ctest_memcheck: Add support for ThreadSanitizer
This commit adds support for ThreadSanitizer to ctest.  ThreadSanitizer
is part of the clang compiler and also gcc 4.8 and later. You have to
compile the code with special flags. Then your code gets the the
ThreadSanitizer ability built into it. To pass options to the
ThreadSanitizer you use an environment variable. This commit teaches
ctest to parse the output from ThreadSanitizer and send it to CDash.
2014-07-09 09:48:35 -04:00
Stephen Kelly af8a1643c1 Remove c_str calls when using stream APIs.
Use an ad-hoc clang tool for matching the calls which should be
ported.
2014-03-11 15:03:50 +01:00
Rolf Eike Beer 3a0d164bb2 allow to mark a test as "Not Run" with a specific return code (#8466) 2014-01-14 23:57:40 +01:00
Rolf Eike Beer 6f9aaad150 CTest: create one output file per memcheck (#14303)
The output file used for memory checker runs must be unique for every test run
in parallel, so simply make them unique for every test run. Simply use the test
index to avoid collisions.
2013-08-07 22:25:48 +02:00
Brad King e477f21af2 Merge topic 'MemChecker-improvements'
10bc50e Tests: ignore Guard Malloc messages in MemChecker tests
159c3e9 Tests: add a test with custom options passed to valgrind
61ddb93 CTest: fix comment documenting cmBoundsCheckerParser class
cbdfcb0 Tests: add test for non-existent Valgrind suppression file
3b5b758 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
7752253 Tests: verify that memory checker output files are always present
abf1df4 Tests: remove code duplication in CTestTestMemCheck tests
f499422 CTest: remove unreachable code and CTestTestMemcheckUnknown test
dde6306 CTest: use an output file for Valgrind (#14110)
bcc0f3f Tests: create output files for all memory checkers
2013-05-16 14:38:35 -04:00
Rolf Eike Beer 12cf7bc507 CTest: break after first regex match on output
PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION both take a list of expressions.
Stop searching if the first of those has matched the output as the result will not
change anymore.
2013-05-11 12:15:38 +02:00
Rolf Eike Beer dde6306a48 CTest: use an output file for Valgrind (#14110)
This makes sure Valgrind output will not screw up tests that match on the
output.
2013-05-09 19:22:01 +02: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
Brad King b10c5cbb87 CTest: Simplify environment save/restore
Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment.  Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere.  Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
2012-04-24 16:56:14 -04:00
Thomas Jarosch f47393c66b CTest: Fix memory leaks on error
Credit goes to "cppcheck".

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
2011-09-02 11:15:11 -04:00
Brad King a4ec24269b CTest: Report tests not run due to unknown configuration
When add_test(NAME) is called without the CONFIGURATIONS argument then
the test is intended to run in any configuration.  In multi-config
generators like the VS IDE and Xcode tests created by add_test(NAME) can
only be run when testing a known configuration (otherwise there is no
way to generate the test command line).  If no test command line is
known for a particular configuration, or if no configuration is given to
ctest, report the test as not run instead of silently skipping it.

Also fix CMake's own TestsWorkingDirectory test invocation to correct a
previously silent failure exposed by this change.
2011-06-10 09:52:18 -04:00
Zach Mullen 9c3a0b9f14 We will actually compress memcheck output if the server supports it.
This change won't be functional until the next release of CDash due to the
version comparison.
2011-05-26 14:50:07 -04:00
Zach Mullen 8024c53389 Dynamic analysis test output should not be compressed. 2011-04-29 12:12:26 -04:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -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
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
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 73144a8f1c Merge branch 'fix_ctest_failure_code' 2010-06-24 10:35:10 -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
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 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 767ffba8ff Added RESOURCE_LOCK test property. 2010-03-02 15:38:02 -05:00
Zach Mullen b4d27dc041 Use historical average of test times to schedule tests. 2010-02-26 11:02:05 -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 3312e3d710 Fix size type conversion warning in RunTest. 2009-12-21 09:52:56 -05:00
Zach Mullen 66f44f64d5 Fix segfault on Borland compiler resulting from divide by 0. 2009-12-18 11:42:58 -05:00
Zach Mullen 1842d2eae0 Fix output compression error message 2009-12-17 11:17:57 -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 5e427677c3 Restore the "***Not Run" message to ctest command line output for tests which did not start due to missing/bad executables or missing required files. 2009-12-10 15:51:56 -05:00
Zach Mullen 4de7cc3621 Unfortunately, I noticed the comment on bug 8668 too late. This changes my last implementation of the exe wrapper to something which makes much more sense: a REQUIRED_FILES property on tests. 2009-12-10 15:37:04 -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
Bill Hoffman 22c37b2b19 Hanle the case where a test can not be run because it is a bad executable. 2009-12-02 16:37:43 -05:00
Zach Mullen c17ce46c73 Align test output for timeout condition. 2009-11-30 16:09:00 -05:00
Zach Mullen 727fa7bcb6 Fix ctest output alignment for cases where total tests run is not the same width as max test index. 2009-10-15 12:02:22 -04:00
David Cole 85feea2d0d Fix floating point comparison warnings. Thanks to Alex Neundorf for the patch. 2009-10-13 16:39:48 -04: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