summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMemCheckHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+1
| | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* ctest_memcheck: ignore false-positives in CUDA's compute-sanitizerTobias Ribizel2022-10-071-4/+17
| | | | | | | Add a list of false-positive messages from CUDA's compute-sanitizer to the CTest memcheck. Fixes: #24001
* clang-tidy: address `google-readability-casting` lintsBen Boeckel2022-05-241-1/+2
| | | | At least those involving `static_cast`.
* ctest: add option for output truncationFrank Winklmeier2022-03-081-1/+2
| | | | | | | | | | Add `--test-output-truncation` to `ctest`. This option can be used to customize which part of the test output is being truncated. Currently supported values are `tail`, `middle` and `head`. Also add equivalent `CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variable. Fixes: #23206
* ctest: support <CTestMeasurement> for runtime measurementsZack Galbreath2021-07-011-1/+1
| | | | | | | | | | | | | | | | | | | Teach CTest to parse output for <CTestMeasurement> in addition to <DartMeasurement> for measurements defined at runtime. Use a new class (cmCTestTestMeasurementXMLParser) derived from cmXMLParser to parse the data and attributes these XML elements. This is an improvement over our previous approach of using a series of regular expressions. As part of this commit we also rename some member variables and methods to make their purpose more clear. DartStuff -> AllTestMeasurementsRegex DartStuff1 -> SingleTestMeasurementRegex DartString -> TestMeasurementsOutput GenerateDartOutput() -> GenerateCTestXML() GenerateRegressionImages() -> RecordCustomTestMeasurements() cmCTestRunTest::DartProcessing() -> ParseOutputForMeasurements()
* clang-tidy: fix `readability-make-member-function-const` warningsBen Boeckel2021-01-271-1/+1
|
* CTest: Save sanitizer output files after test executionPawel Dac2021-01-131-3/+9
| | | | | | | Prior to this change after tests were executed output files produced by sanitizers were removed. User couldn't check in detail why test case didn't pass. Output files are kept without pid in the end.
* CTest: Rename CudaMemcheck to CudaSanitizerTobias Ribizel2020-11-171-15/+15
|
* CTest: add compute-sanitizer alias for cuda-memcheckTobias Ribizel2020-10-011-1/+2
|
* CTest: Add error types to cuda-memcheck parserTobias Ribizel2020-08-051-1/+2
|
* cmCTest: Members accept std::string parametersVitaly Stakhovsky2020-07-271-1/+1
|
* CTest: add cuda-memcheck supportTobias Ribizel2020-07-091-0/+142
|
* Merge topic 'ctest-memcheck-sanitizers'Craig Scott2020-04-191-8/+5
|\ | | | | | | | | | | | | | | e03d3c08f0 CTest: Fix '-T MemCheck' command-line support for sanitizers 82b6091776 Tests: Fix RunCMake.ctest_memcheck test script syntax errors Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4618
| * CTest: Fix '-T MemCheck' command-line support for sanitizersBrad King2020-04-171-8/+5
| | | | | | | | | | | | | | | | | | | | | | In commit 49948f7221 (ctest_memcheck: Add support for ThreadSanitizer, 2014-07-07, v3.1.0-rc1~322^2~1) and commit 1e005eadbc (CTest: Fix MemoryCheckType from 'ctest -T MemCheck', 2014-07-15, v3.1.0-rc1~298^2), the `CMakeCommand` internal setting was left set only when using `ctest -S` scripts. Instead simply use CTest's corresponding CMake directly without passing it through an internal setting. Fixes: #20584
* | Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-3/+4
|/
* clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-27/+13
| | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* ctest: add support for memcheck using Dr. MemoryDietmar Scheidl2019-12-101-0/+173
| | | | Fixes: #19788
* cmCTestMemCheckHandler.cxx: minor refactoringDietmar Scheidl2019-12-101-6/+3
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-9/+10
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-4/+1
| | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-2/+2
|
* cmSystemTools: More functions accept `std::string` paramsVitaly Stakhovsky2019-02-201-1/+1
|
* cmSystemTools: More methods accept `std::string` paramsVitaly Stakhovsky2019-02-111-4/+4
|
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-12/+12
|
* ctest_memcheck: Change failure to find log file from error to warningBetsy McPhail2018-08-281-2/+2
| | | | | | | | | | | Sanitizers do not create a log file when no defects are found. Therefore, it is currently impossible for ctest_memcheck to set both `CAPTURE_CMAKE_ERROR` and `RETURN_VALUE` to zero. With defects, `CAPTURE_CMAKE_ERROR`=0 and `RETURN_VALUE`=-1, as expected. With no defects, `CAPTURE_CMAKE_ERROR`=-1 and `RETURN_VALUE`=0.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-18/+22
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-14/+10
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Merge topic 'reduce-temporaries'Brad King2018-01-291-7/+8
|\ | | | | | | | | | | | | c85bb007 Reduce allocation of temporary values on heap. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1698
| * Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-7/+8
| | | | | | | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* | CTest: add safe conversion from cmDuration to integer typesWouter Klouwen2018-01-231-12/+11
|/ | | | | | | | | | | | | A problem area by recent refactoring of time to std::chrono has been the unsafe conversion from duration<double> to std::chrono::seconds, which is of an unspecified integer type. This commit adds a template function that for a given type provides a safe conversion, effectively clamping a duration<double> into what fits safely in that type. A specialisation for int and unsigned int are provided. It changes the protential problem areas to use this safe function.
* Various typo fixesLuz Paz2018-01-031-1/+1
| | | | Some are user-facing. Others are source comments.
* 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
|