summaryrefslogtreecommitdiffstats
path: root/Source/CTest
Commit message (Collapse)AuthorAgeFilesLines
* Simplify CMake per-source license noticesBrad King2016-09-2788-996/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge topic 'test-fixtures'Brad King2016-09-225-2/+233
|\ | | | | | | | | 73f47c9e CTest: Add support for test fixtures
| * CTest: Add support for test fixturesCraig Scott2016-09-205-2/+233
| | | | | | | | | | | | | | | | | | | | | | Add new test properties: * FIXTURES_SETUP * FIXTURES_CLEANUP * FIXTURES_REQUIRED to specify the roles and dependencies of tests providing/using test fixtures.
* | Merge topic 'ctest-capture-error'Brad King2016-09-215-6/+119
|\ \ | |/ |/| | | | | | | | | adf1e32f Help: Add notes for topic 'ctest-capture-error' d328dc68 CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commands 9ac2e189 ctest_coverage: If gcov is not found just warn, not error
| * CTest: Add CAPTURE_CMAKE_ERROR val to `ctest_*` commandsBill Hoffman2016-09-204-4/+118
| | | | | | | | | | | | | | If a `ctest_*` command has CAPTURE_CMAKE_ERROR then any errors generated by cmake during that command will cause the value to be assigned `-1`. This will prevent a `ctest -S` script from returning non-zero unless the script explicitly calls `message(FATAL_ERROR)`.
| * ctest_coverage: If gcov is not found just warn, not errorBill Hoffman2016-09-201-2/+1
| |
* | CTestSVN: Fix segfault when CTEST_UPDATE_VERSION_ONLY is enabledNils Gladitz2016-09-122-9/+10
|/ | | | | | | | | Before the change the list of externals was queried only before the svn update. With the change the list is queried both before and after. This should also be more accurate since the list of externals might change during the update.
* surround macro arguments with parenthesesDaniel Pfeifer2016-09-051-2/+2
|
* CTest: fix include-what-you-use violationsDaniel Pfeifer2016-08-2593-177/+642
|
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-232-0/+5
|
* CTest: don't use else after returnDaniel Pfeifer2016-08-1814-81/+66
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-1617-39/+42
|
* Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-183-24/+26
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-293-5/+5
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-2833-146/+160
|
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-2742-139/+140
|
* Add CM_OVERRIDE to some functionsDaniel Pfeifer2016-06-2712-65/+65
| | | | | | | 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.
* Prefer istringstream and ostringstream over stringstream.Daniel Pfeifer2016-06-141-1/+1
| | | | Use istringsream for parsing, ostringstream for generation.
* Add missing braces around statements.Daniel Pfeifer2016-06-105-10/+20
| | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* Prefer std::ostream& over derivatives as parametersDaniel Pfeifer2016-06-082-4/+4
|
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-066-19/+18
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Merge topic 'size-empty'Brad King2016-06-0311-25/+27
|\ | | | | | | | | c6220de2 Use the empty() method to check for emptyness.
| * Use the empty() method to check for emptyness.Daniel Pfeifer2016-06-0211-25/+27
| | | | | | | | | | Apply fix-its from clang-tidy's readability-container-size-empty checker.
* | Simplify boolean expressionsDaniel Pfeifer2016-06-026-43/+12
|/ | | | | | 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-2712-24/+21
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.
| * Remove unnecessary local copies.Daniel Pfeifer2016-05-263-9/+6
| | | | | | | | | | | | | | 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-2610-15/+15
| | | | | | | | | | | | | | 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-267-21/+15
|/ | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Improve string find: prefer character overloads.Daniel Pfeifer2016-05-245-7/+7
| | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* cmCTestScriptHandler: don't call find repeatedly.Daniel Pfeifer2016-05-241-3/+4
| | | | Also, prefer the character overload.
* Revise C++ coding style using clang-formatKitware Robot2016-05-1693-9686/+7405
| | | | | | | | | | | | | 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.
* CTest: Do not treat "Note: ..." lines as errors (#14394)Brad King2016-05-111-0/+1
| | | | | | | | Otherwise CTest interprets the Qt5 moc tool output Note: No relevant classes found. No output generated. as a compiler error.
* Remove `//------...` horizontal separator commentsBrad King2016-05-0931-374/+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.
* Move comments off of class access specifier linesBrad King2016-05-062-2/+5
| | | | | | | | | | | | | | | | | | The clang-format tool may turn this: public: // comment about access specifier // unrelated comment indented with code ... Into: public: // comment about access specifier // unrelated comment indented with code ... Avoid this by moving comments off of access specifier lines.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-065-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Source: Sort includes of sys/types.h as clang-format wouldBrad King2016-05-032-2/+2
| | | | | When this header is included in blocks where order does not matter, just place it in lexicographic order as clang-format would by default.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-2929-110/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2940-34/+42
| | | | | 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.
* Merge topic 'ctest-run-submodule-sync'Brad King2016-04-052-4/+45
|\ | | | | | | | | | | | | | | c18d91ad Help: add release notes for topic 'ctest-run-submodule-sync' 7f560743 cmCTestGIT: run `git submodule sync` before updating submodules 06b310b5 cmCTestGIT: add an option to initialize submodules on update 56c1ea40 cmCTestGIT: fix git version references
| * cmCTestGIT: run `git submodule sync` before updating submodulesBen Boeckel2016-04-011-0/+22
| | | | | | | | | | If the URL of a submodule changes upstream, the commits referenced at the old URL may not be available and will cause an update failure.
| * cmCTestGIT: add an option to initialize submodules on updateBen Boeckel2016-04-012-1/+20
| | | | | | | | | | | | | | Currently, CTest will not initialize any submodules within the already checked out source tree. Add an option to do so. The use case for not doing so is that some submodules may not be necessary for the current test and keeping network usage down may be important.
| * cmCTestGIT: fix git version referencesBen Boeckel2016-04-011-3/+3
| | | | | | | | Git does not use a 4-component version number.
* | Merge topic 'cobertura_off_by_one'Brad King2016-04-051-1/+0
|\ \ | | | | | | | | | | | | 398b8800 cmParseCoberturaCoverage: Remove extra coverage line
| * | cmParseCoberturaCoverage: Remove extra coverage lineZack Galbreath2016-03-301-1/+0
| |/ | | | | | | | | Fix off-by-one error in cmParseCoberturaCoverage that added an extra blank line to the end of source file being covered.
* | Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-291-1/+1
|/ | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* 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-225-0/+62
| | | | | | 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: 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_test: Report which tests failed even when QUIET is usedZack Galbreath2016-01-131-2/+2
| | | | | | | | | | Since commit v3.3.0-rc1~410^2~3 (ctest_test: Add QUIET option, 2015-02-17) if tests fail when QUIET is used one sees: The following tests FAILED: but not the subsequent line(s) indicating which tests failed. Restore the list of failed tests.
* 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.