summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMemCheckHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Add mappings for std::enable_if on chrono durationsBrad King2017-11-281-1/+0
| | | | | | | | IWYU incorrectly classifies this internal STL type as not internal, and suggests including `<type_traits>` for it. Work around the problem by mapping the offending names to a file that we always include. See include-what-you-use issue 434.
* CTest: use std::chrono::steady_clock for time keepingWouter Klouwen2017-11-141-6/+16
| | | | | | | | | | | | It was reported in issue #17345 that CTest does not use monotonic time to report test duration. Monotonic clocks are not affected by large NTP adjustments or things like daylight savings time. As CMake 3.10 requires C++11, which introduced std::chrono, this commit moves the time keeping in CTest from cmSystemTools::GetTime() to std::chrono::steady_clock. Fixes: #17345
* Merge topic 'string-clear'Brad King2017-09-191-10/+10
|\ | | | | | | | | | | | | 5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
| * Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-10/+10
| |
* | Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-2/+2
|/ | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* Meta: modernize old-fashioned loops to range-based `for` (CTest).Pavel Solodovnikov2017-09-141-35/+27
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* use static_cast<> for casts from void*Rolf Eike Beer2017-09-011-1/+1
|
* Replace C-style castsDaniel Pfeifer2017-08-271-2/+2
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-9/+9
|
* Add CTEST_LABELS_FOR_SUBPROJECTS as a CTest module and script variableBetsy McPhail2017-07-101-0/+1
| | | | | Use this variable to specify a list of labels that will be reported to CDash as subprojects.
* Access string npos without instancePavel Solodovnikov2017-06-011-2/+2
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-3/+3
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* ctest_memcheck: Fix sanitizers when MemoryCheckSanitizerOptions is emptyJamie Snape2017-01-231-3/+9
|
* ctest_memcheck: Append sanitizers user options at the end to allow overridingSylvain Joubert2017-01-111-1/+1
|
* ctest_memcheck: do not add detect_leaks=1 to ASAN_OPTIONSJamie Snape2017-01-091-1/+0
|
* ctest_memcheck: join *SAN_OPTIONS with :Jamie Snape2017-01-091-4/+4
|
* MEMORYCHECK_SUPPRESSIONS_FILE: add support for sanitizersJamie Snape2017-01-091-1/+8
|
* ctest_memcheck: add support for standalone LeakSanitizerJamie Snape2017-01-091-0/+17
|
* ctest: Improve output for `-T memcheck`Bill Hoffman2016-11-171-10/+22
| | | | | Show how many defects each test that had a defect produced. Also tell the user where to find the full log files.
* Merge topic 'cdash_version_check'Brad King2016-11-111-1/+1
|\ | | | | | | | | | | d3633731 Do not query CDash for version f725b20b Update tests that expect uncompressed output
| * Do not query CDash for versionZack Galbreath2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This check was not functioning properly for the following reasons: * The "DropSite" and "DropLocation" CTest Configurations do not get set until ctest_submit() is called. So if ctest_submit() was not called before ctest_test() we would end up with uncompressed output, even if the CDash server was new enough to support this feature. * CDash's API is now versioned. The current location to query is now /api/v1/getversion.php, not /api/getversion.php. As a result of these issues, CTest would not compress test/memcheck output when it should. Rather than fix this check, we now assume that CTest is communicating with a new enough version of CDash. This behavior can be controlled through the use of the --no-compress-output command-line argument.
* | 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.