summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCoverageHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: remove else after break and continueDaniel Pfeifer2017-04-211-1/+2
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-4/+4
| | | | | | | | | | | | | 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'
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-15/+5
| | | | | | These functions just need to change the directory for a block of code and then go back to the caller's expected location. Use cmWorkingDirectory to ensure that all return paths are handled.
* cmCTest, cmCTestCoverageHandler: remove cwd danceBen Boeckel2017-03-061-5/+0
| | | | The working directory changes here didn't really accomplish anything.
* clang-tidy: apply readability-redundant-string-init fixesDaniel Pfeifer2016-12-121-6/+6
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+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_coverage: If gcov is not found just warn, not errorBill Hoffman2016-09-201-2/+1
|
* CTest: fix include-what-you-use violationsDaniel Pfeifer2016-08-251-4/+8
|
* CTest: don't use else after returnDaniel Pfeifer2016-08-181-5/+4
|
* Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-181-7/+6
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-5/+5
|
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-2/+2
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-12/+4
| | | | | | 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.
* Merge topic 'remove-needless-copies'Brad King2016-05-271-2/+1
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.
| * Remove unnecessary local copies.Daniel Pfeifer2016-05-261-1/+0
| | | | | | | | | | | | | | Use clang-tidy's performance-unnecessary-copy-initialization checker. After applying the fix-its (which turns the copies into const&), revise the changes and see whether the copies can be removed entirely by using the original instead.
| * Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-1/+1
| | | | | | | | | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* | Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-1/+1
|/ | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Improve string find: prefer character overloads.Daniel Pfeifer2016-05-241-2/+2
| | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-1236/+962
| | | | | | | | | | | | | 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-37/+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-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Make coverage file selection more specific.Joseph Snyder2016-02-251-2/+18
| | | | | | | When performing some other testing, the globs for Blanket.js and Delphi code coverage are picking up unintended files. Change the query for the Delphi coverage to follow the naming convention, and check the second line of the found JSON files for certain text before parsing them as coverage files.
* CTest: Expand directories for Cobertura searchJoseph Snyder2015-11-231-3/+18
| | | | | | | | | | Change the Cobertura handler to look for an environment variable called "COBERTURADIR" which contains the directory where the coverage.xml file is found. If that variable doesn't exist, continue to use the default of the binary directory. Update the test to use an appropriate value in the environment variables.
* Merge topic 'jacoco_out_of_source'Brad King2015-11-161-4/+21
|\ | | | | | | | | 1db32ffe ctest_coverage: Search for Jacoco files in the binary directory
| * ctest_coverage: Search for Jacoco files in the binary directoryZack Galbreath2015-11-161-4/+21
| | | | | | | | | | Search for Jacoco coverage files in both the source directory and the binary directory.
* | Fix trivial clang -Wdouble-promotion warningsSean McBride2015-11-111-1/+1
|/
* Remove use of include <cmsys/stl/*> and cmsys_stl::*Brad King2015-08-201-2/+0
| | | | We no longer need this compatibility layer for the compilers we support.
* cmCTestCoverageHandle: Improve error handling.James Johnston2015-08-081-6/+27
|
* ctest_coverage: Always do coverage for CTEST_EXTRA_COVERAGE_GLOBZack Galbreath2015-07-131-1/+1
| | | | | | | | Do not ignore a coverage request if CTEST_EXTRA_COVERAGE_GLOB was specified. Prior to this change, if no lines of code were covered by any tests then CTest would neglect to generate a Coverage.xml file. This change allows us to report uncovered files for a project with no tests.
* cmCTestCoverageHandler: Port to cmXMLWriterDaniel Pfeifer2015-05-261-157/+148
|
* ctest_coverage: Add QUIET optionZack Galbreath2015-02-231-181/+191
|
* Remove use of cmsys_stl.Stephen Kelly2015-02-051-2/+2
| | | | It is not needed.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-6/+6
|
* 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-6/+6
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-4/+4
|
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-4/+4
| | | | | | | | All compilers hosting CMake support the std class.
* | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-5/+1
|/
* ctest_coverage: Fix error message to report the file nameVladislav Vinogradov2014-12-221-1/+1
| | | | | Print file name instead of line content for "Looks like there are more lines in the file:" error message.
* Remove some unneeded c_str calls.Stephen Kelly2014-11-231-8/+8
|
* CTest: Add Javascript coverage parserJoseph Snyder2014-10-291-0/+40
| | | | | | | Add a coverage parser for the Blanket.js library using the JSON output of the mocha.js test runner. Add a test for the new parser.
* Merge topic 'remove-redundant-c_str'Brad King2014-10-211-21/+21
|\ | | | | | | | | cc1139cc strings: Remove redundant calls to std::string::c_str()
| * strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-21/+21
| | | | | | | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* | CTest: Add code coverage parser for Pascal/DelphiJoseph Snyder2014-10-211-0/+36
|/ | | | | | | | Add a class to parse the HTML output of the Delphi-code-coverage tool http://code.google.com/p/delphi-code-coverage/ Add a test for the new parser.
* CTest: Add Jacoco Coverage functionalityJoseph Snyder2014-06-121-0/+40
| | | | | | | | Add the ability to parse the XML output of the Jacoco tool. Jacoco (www.eclemma.org/jacoco) is a Java coverage tool. Add and integrate a class for the parser and include a test which utilizes the new parser.
* CTest: Rename coverage implementation for "Python" to "Cobertura"Joseph Snyder2014-06-041-6/+6
| | | | | | The coverage.py tool writes out an XML that conforms to the Cobertura Coverage tool standard. Rename the cmParsePythonCoverage files to instead be cmParseCoberturaCoverage.
* CTest: Add support for Intel coverage filesVolkan Gezer2014-03-131-0/+305
| | | | | | | | | | | | | | | | | | By default, Intel compiler coverage tools generate HTML files as reports, but the option -txtlcov can be given to codecov to output a coverage file with LCov format. To use Intel coverage: * build the project with coverage flags * run the application * run profmerge * run codecov The output file will be "build_dir/CodeCoverage/SRCFILEDIR.LCOV". Ask users to compile with -prof-dir${BUILD_DIR} instead of searching the entire build tree recursively to find coverage files.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-44/+44
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.