summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMemCheckHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* ctest_memcheck: Add DEFECT_COUNT option to capture defect countBetsy McPhail2016-11-091-2/+11
|
* Do not define cout/cerr preprocessor symbolsBrad King2016-10-041-4/+0
| | | | | | Apply the change from commit bd3d0eaf (cmCTest: don't redefine cout and cerr, 2016-09-01) to the rest of ctest and cpack. These definitions are no longer needed because our conventions are well established.
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* CTest: fix include-what-you-use violationsDaniel Pfeifer2016-08-251-9/+5
|
* CTest: don't use else after returnDaniel Pfeifer2016-08-181-20/+17
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-1/+1
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-9/+9
|
* Add CM_OVERRIDE to some functionsDaniel Pfeifer2016-06-271-2/+2
| | | | | | | Run clang-tidy's modernize-use-override checker. This checker must have issues in version 3.8. It has way too little matches. And it adds override to destructors. Revert the changes on the destructors and change override to CM_OVERRIDE.
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-4/+4
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Merge topic 'size-empty'Brad King2016-06-031-5/+6
|\ | | | | | | | | c6220de2 Use the empty() method to check for emptyness.
| * Use the empty() method to check for emptyness.Daniel Pfeifer2016-06-021-5/+6
| | | | | | | | | | Apply fix-its from clang-tidy's readability-container-size-empty checker.
* | Simplify boolean expressionsDaniel Pfeifer2016-06-021-12/+3
|/ | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-14/+8
| | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-646/+448
| | | | | | | | | | | | | 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-15/+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-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix XML double-encoding casesDaniel Pfeifer2015-08-281-10/+6
| | | | | | | Remove use of cmXMLSafe from CTest when generating content that is later handled by cmXMLWriter. This was broken by refactoring in the topic merged by commit v3.3.0-rc1~22 (Merge topic 'ctest-xml-refactor', 2015-05-28).
* cmCTest{Test,MemCheck}Handler: Port to cmXMLWriterDaniel Pfeifer2015-05-261-49/+41
|
* ctest_memcheck: Add QUIET optionZack Galbreath2015-02-231-36/+41
|
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-3/+3
|
* Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-4/+4
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-6/+6
| | | | All compilers hosting CMake support the std class.
* ctest_memcheck: Do not open empty BC output file nameBrad King2014-12-161-0/+4
| | | | | | In cmCTestMemCheckHandler::PostProcessBoundsCheckerTest return early if the output file name is empty. We already do this in the similar cmCTestMemCheckHandler::AppendMemTesterOutput method.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-3/+3
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* ctest_memcheck: Add support for MemorySanitizer msanBill Hoffman2014-10-071-0/+22
|
* ctest_memcheck: Add support for UndefinedBehaviorSanitizer ubsanBen Boeckel2014-10-071-1/+22
| | | | | UBSan instruments a build and logs messages on any undefined behavior instances.
* ctest_memcheck: Order sanitizer type code consistentlyBrad King2014-10-071-22/+24
| | | | Use alphabetic order everywhere we enumerate the sanitizer types.
* ctest: add support for additional sanitizer optionsBen Boeckel2014-10-031-5/+11
| | | | | Sanitizers receive options through their environment variable; support user-specified options here.
* Fix truncation of valgrind output logic.Bill Hoffman2014-08-041-22/+19
| | | | | | This showed up because scan-build noticed outputFull was basically a constant. Logic should be output all valgrind output. Then output regular test output until output limit is reached.
* Handle more than one process with sanitizer errors.Bill Hoffman2014-07-241-9/+18
| | | | | | Since the Sanitizers write out one log file per process, a single test might have more than one log file. This commit allows ctest to read all of the log files found for a particual test.
* CTest: Fix MemoryCheckType from 'ctest -T MemCheck'Bill Hoffman2014-07-161-2/+2
| | | | | | Before this commit, you would have to run ctest -S mode to get MemoryCheckType to work. This is because CMAKE_COMMAND was not set. The fix is to use cmSystemTools::GetCMakeCommand instead.
* ctest_memcheck: Add support for memory and leak sanitizer.Bill Hoffman2014-07-161-11/+63
| | | | | | This adds support for memory and leak sanitizers. This is built into clang and gcc 4.8 and new compilers. It is activated with a -f switch during compile.
* ctest_memcheck: Add support for ThreadSanitizerBill Hoffman2014-07-091-133/+306
| | | | | | | | | 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.
* cmCTestMemCheckHandler: Fix coding style in this classBill Hoffman2014-06-251-6/+6
| | | | | This class had a method that started with lower case, and also was called without this->.
* Fix ctest to allow valgrind to show up in the path name of a memcheck tool.Bill Hoffman2014-06-131-4/+5
| | | | | | | For testing purposes CMake creates dummy memory checkers. The dummy checkers are in the CMake build tree. Before this change when the path contained the string valgrind, such as CMake-valgrind, all the checkers were thought to be valgrind, and this caused tests to fail.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-8/+8
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-12/+6
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-17/+17
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-2/+3
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* CTest: create one output file per memcheck (#14303)Rolf Eike Beer2013-08-071-31/+70
| | | | | | 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.
* CTest: fix comment documenting cmBoundsCheckerParser classRolf Eike Beer2013-05-091-2/+1
| | | | | This was obviously copied from Source/cmGlobalXCodeGenerator.cxx during implementation but the comment was forgotten.
* CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flagsRolf Eike Beer2013-05-091-1/+0
| | | | | | | | | | | The --workaround-gcc296-bugs has been part of the default Valgrind flags since Valgrind support was added in commit 5b232ded151fc22144978b74cdaf7031d466e527 (ENH: Add initial memory check support which works for Valgrind, 2003-12-15). The Valgrind manpage says that this option should be avoided if not really needed as it may cause real errors to get ignored. If someone uses a compiler that really needs the flag this flag should be set by the user explicitely. Most users will never set any flags and probably never notice that they use a flag they shouldn't.
* CTest: remove unreachable code and CTestTestMemcheckUnknown testRolf Eike Beer2013-05-091-7/+0
| | | | | | | The memory checker command can't be quoted at this point, because previously it has been tested that the given file exists, which will fail if the name is quoted. The CTestTestMemcheckUnknown test aimed to test this case, has always failed to do so and serves no useful purpose therefore.
* CTest: use an output file for Valgrind (#14110)Rolf Eike Beer2013-05-091-0/+20
| | | | | This makes sure Valgrind output will not screw up tests that match on the output.
* CTest: improve memory checker type detectionRolf Eike Beer2012-10-041-69/+89
| | | | | | | If the checker was explicitely set with a "TypeCommand" variable (e.g. ValgrindCommand) then we now just believe that this is valgrind, even if nothing in the path matches "valgrind". Only when "MemoryCheckCommand" was used we still scan the path to find out what checker we have.
* CTest: fix usage of memory checker with spaces in pathRolf Eike Beer2012-10-011-9/+6
| | | | | | | | | The filename was escaped in cmCTestMemCheckHandler::InitializeMemoryChecking() and again before it was written to output in cmCTestRunTest::ComputeArguments(). Once someone uses e.g. a valgrind path with spaces this leads to double escaping making the memory checker fail completely because of the invalid path.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-20/+20
| | | | | | | | | | | | | | | | | 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: Escape MemCheck test output for XML (#13124)Brad King2012-04-261-1/+1
| | | | | Any output that goes through CleanTestOutput must be printed through cmXMLSafe.
* CTest: Match valgrind errors with "points to" (#12922)Alexandru Ciobanu2012-03-091-1/+1
| | | | | Teach CTest to match valgrind errors of the format "Syscall param ... points to uninitialised byte(s)".