summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use the empty() method to check for emptyness.Daniel Pfeifer2016-06-021-2/+3
| | | | | Apply fix-its from clang-tidy's readability-container-size-empty checker.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-2/+2
| | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-358/+277
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* CTest: Only apply the secondary test timeout onceZack Galbreath2016-03-231-0/+2
| | | | | | | | | | This commit fixes a bug in the implementation of the test property TIMEOUT_AFTER_MATCH. The new timeout value was being applied every time a line was output by the test after the match had been encountered. Now the new timeout value is only set once. This commit also improves some output formatting related to this property.
* CTest: Optionally use a secondary test timeout after matching outputZack Galbreath2016-03-221-0/+22
| | | | | | Allow a test N seconds to complete after we detect a matching line in its output. Activate this behavior with a new TIMEOUT_AFTER_MATCH test property.
* CTest: Capture test stdout/stderr through one pipe (#15600)Brad King2015-06-031-2/+1
| | | | | | | Use the KWSys Process "MergeOutput" option to give each test child process the same pipe for both stdout and stderr. This allows natural merging of stdout and stderr together instead of merging on arbitrary buffered read boundaries as before.
* CTest: Generate NamedMeasurement elements directly into xml fileDaniel Pfeifer2015-05-261-3/+1
| | | | Re-order the logic to avoid use of a temporary std::ostringstream.
* Merge topic 'ctest-repeat-until-fail'Brad King2015-03-231-7/+66
|\ | | | | | | | | | | 6bce0276 Help: Add notes for topic 'ctest-repeat-until-fail' fde70a1b ctest: Add a new --repeat-until-fail option
| * ctest: Add a new --repeat-until-fail optionBill Hoffman2015-03-231-7/+66
| | | | | | | | | | 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.
* | CTest: Output test-specific env vars in verbose mode (#15446)Zach Mullen2015-03-171-0/+15
|/ | | | | | 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.
* ctest_memcheck: Add QUIET optionZack Galbreath2015-02-231-6/+8
|
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-3/+3
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* cmCTest: Use size_t for cmsysBase64_Encode return valueBrad King2014-12-261-2/+2
|
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-2/+2
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* ctest_memcheck: Add support for ThreadSanitizerBill Hoffman2014-07-091-14/+1
| | | | | | | | | 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.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-14/+14
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* allow to mark a test as "Not Run" with a specific return code (#8466)Rolf Eike Beer2014-01-141-1/+7
|
* CTest: create one output file per memcheck (#14303)Rolf Eike Beer2013-08-071-4/+4
| | | | | | 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.
* Merge topic 'MemChecker-improvements'Brad King2013-05-161-6/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * CTest: use an output file for Valgrind (#14110)Rolf Eike Beer2013-05-091-6/+12
| | | | | | | | | | This makes sure Valgrind output will not screw up tests that match on the output.
* | CTest: break after first regex match on outputRolf Eike Beer2013-05-111-0/+2
|/ | | | | | 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.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-26/+26
| | | | | | | | | | | | | | | | | 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/ \+$//'
* CTest: Simplify environment save/restoreBrad King2012-04-241-1/+1
| | | | | | | | 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.
* CTest: Fix memory leaks on errorThomas Jarosch2011-09-021-0/+2
| | | | | | Credit goes to "cppcheck". Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
* CTest: Report tests not run due to unknown configurationBrad King2011-06-101-0/+24
| | | | | | | | | | | | | 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.
* We will actually compress memcheck output if the server supports it.Zach Mullen2011-05-261-6/+9
| | | | | This change won't be functional until the next release of CDash due to the version comparison.
* Dynamic analysis test output should not be compressed.Zach Mullen2011-04-291-2/+3
|
* Test TIMEOUT property explicitly set to zero should be honoredZach Mullen2011-01-031-3/+8
|
* When processing DartMeasurements use the tests working directory.Bill Hoffman2010-10-191-0/+10
| | | | 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.
* CTest: Avoid use of old EscapeSpaces methodBrad King2010-08-181-7/+9
| | | | | | | | 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.
* Eliminate -Wconversion warnings.David Cole2010-06-271-5/+7
| | | | | | 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.
* Merge branch 'fix_ctest_failure_code'Brad King2010-06-241-1/+1
|\
| * Fix for bug #10859, ctest exit exception incorrectly reported.Bill Hoffman2010-06-221-1/+1
| | | | | | | | | | CTest was using the return value from the program instead of the exit exception value for the process.
* | Do not exit if stoptime is passed.Zach Mullen2010-06-151-4/+11
|/
* Fix intermingling of test environments when tests run in parallel.David Cole2010-03-301-11/+6
| | | | | | | | | | | | 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.
* Better detection of stop_time being passed.Zach Mullen2010-03-191-3/+3
|
* Fix StopTime to also account for localtime being a day ahead of gmtimeZach Mullen2010-03-181-4/+5
|
* Fix for StopTime for cases when gmtime is a day ahead of localtimeZach Mullen2010-03-181-6/+17
|
* More debugging of StopTime testZach Mullen2010-03-181-0/+2
|
* Test using std::minZach Mullen2010-03-171-2/+2
|
* Replace min() call with its literal definitionZach Mullen2010-03-171-1/+2
|
* Add the --stop-time argumentZach Mullen2010-03-171-2/+52
| | | | Unit test and script hook for STOP_TIME
* Added RESOURCE_LOCK test property.Zach Mullen2010-03-021-2/+2
|
* Use historical average of test times to schedule tests.Zach Mullen2010-02-261-1/+17
|
* Support for relative paths to executables in MemCheck tests. Also fixed a ↵Zach Mullen2010-02-041-1/+3
| | | | bug causing memcheck args to be overwritten repetitively.