summaryrefslogtreecommitdiffstats
path: root/Source/CTest
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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-112-2/+2
|/
* Merge topic 'fix-test-RUN_SERIAL-failure-regression'Brad King2015-10-261-5/+4
|\ | | | | | | | | e61973e1 CTest: Fix regression in handling of a RUN_SERIAL test that fails
| * CTest: Fix regression in handling of a RUN_SERIAL test that failsBrad King2015-10-231-5/+4
| | | | | | | | | | | | | | Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler: Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code path for cleaning up after a failed RUN_SERIAL test. This causes an infinite loop after a RUN_SERIAL test fails. Fix it and add a test.
* | cmState: Initialize default definitions immediately.Stephen Kelly2015-10-133-0/+3
| | | | | | | | Don't leave this as cmMakefile responsibility.
* | Merge topic 'ctest-submit-content-type'Brad King2015-10-122-0/+14
|\ \ | |/ | | | | | | 2a6e0b61 CTest: Set Content-Type header for http file upload (#15774)
| * CTest: Set Content-Type header for http file upload (#15774)Derek Bruening2015-10-122-0/+14
| | | | | | | | | | Sets the Content-Type header for http file uploads to avoid running afoul of ModSecurity rules on the server.
* | Set the current dirs on the snapshot before creating the cmMakefile.Stephen Kelly2015-10-071-6/+3
| | | | | | | | | | | | The cmMakefile should get a fully prepared snapshot and not clobber its definitions. It should eventually be able to process list files from any starting-point snapshot, though that is some refactoring away still.
* | Remove unused cmLocalGenerator include.Stephen Kelly2015-10-053-3/+0
| |
* | CTest: Port away from cmLocalGenerator.Stephen Kelly2015-10-052-14/+2
| |
* | CTest: Remove needless cmLocalGenerator creation.Stephen Kelly2015-10-052-6/+0
|/
* CTest: Add options to limit output of passed and failed testsRoman Wüger2015-09-181-0/+5
| | | | | | | | | | Add ctest command-line options: --test-output-size-passed <n> --test-output-size-failed <n> to set the amount of test output to store in Test.xml as a command-line dashboard client.
* Merge topic 'jacoco_find_files'Brad King2015-09-011-52/+87
|\ | | | | | | | | e92c59e7 ctest_coverage: Make Jacoco parser better at finding source files
| * ctest_coverage: Make Jacoco parser better at finding source filesZack Galbreath2015-09-011-52/+87
| | | | | | | | | | | | | | Instead of searching for source files in a couple hard-coded locations, we now search the source and binary directory for files matching both the name of the covered file and its package directory structure.
* | Merge topic 'fix-ctest-xml-double-encoding'Brad King2015-08-315-14/+7
|\ \ | | | | | | | | | | | | | | | | | | ab2524d6 CTest: Fix XML double-encoding cases dee84dc7 cmCTest{BZR,GIT,P4}: Remove unused cmXMLSafe includes b3372db5 cmExtra{Kate,SublimeText}Generator: Remove unused cmXMLSafe includes
| * | CTest: Fix XML double-encoding casesDaniel Pfeifer2015-08-282-11/+7
| | | | | | | | | | | | | | | | | | | | | 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{BZR,GIT,P4}: Remove unused cmXMLSafe includesDaniel Pfeifer2015-08-283-3/+0
| | |
* | | cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-283-8/+10
| | | | | | | | | | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* | | cmCTestScriptHandler: Simplify deletes.Stephen Kelly2015-08-281-26/+9
| | | | | | | | | | | | Deleting a nullptr is fine.
* | | cmGlobalGenerator: Remove MakeLocalGenerator method.Stephen Kelly2015-08-283-3/+3
| | | | | | | | | | | | Inline implementation to callers.
* | | cmGlobalGenerator: Require a snapshot to create a local generator.Stephen Kelly2015-08-283-3/+6
| |/ |/|
* | 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.
* | Remove use of include <cmsys/ios/*> and cmsys_ios::*Brad King2015-08-202-2/+0
| | | | | | | | We no longer need this compatibility layer for the compilers we support.