summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSubmitHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use C++11 nullptrDaniel Pfeifer2017-08-241-9/+9
|
* Change ComputeFileMD5 to ComputeFileHashAndré Klitzing2017-07-141-7/+5
| | | | | | | * Use a parameter to select hash algorithm * Return a std::string as result or an empty string if it fails * Avoids unnecessary copy of hash value
* Access string npos without instancePavel Solodovnikov2017-06-011-1/+1
|
* ctest_submit: Add HTTPHEADER optionZack Galbreath2017-05-041-1/+11
| | | | | | | | | Allow CTest script writers to specify additional HTTP headers to be sent to CDash during submission. The motivating case for this feature is a corresponding change in CDash. This will allow projects to refuse submissions from any site not bearing a valid authentication token.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-5/+5
| | | | | | | | | | | | | 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'
* Add self-sufficient wrapper for <sys/stat.h>Daniel Pfeifer2017-03-241-1/+1
|
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-10/+3
| | | | | | 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.
* ctest_submit: improve handling of QUIET optionZack Galbreath2017-01-201-0/+1
| | | | | Teach the CDASH_UPLOAD signature of ctest_submit() to more thoroughly respect the QUIET option.
* ctest_submit: Allow RETRY_COUNT for CDASH_UPLOADZack Galbreath2017-01-201-16/+101
| | | | | | | | Teach the CDASH_UPLOAD signature of ctest_submit() to honor the RETRY_COUNT and RETRY_DELAY options. Also teach HttpRequest() to honor the default 120 second timeout for curl connections.
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-2/+2
|
* clang-tidy: apply readability-redundant-string-init fixesDaniel Pfeifer2016-12-121-3/+3
|
* iwyu: Fix more findingsDaniel Pfeifer2016-11-281-9/+9
|
* Windows: Encode child process output to internally-used encodingDāvis Mosāns2016-11-141-1/+12
| | | | | | Typically Windows applications (eg. MSVC compiler) use current console's codepage for output to pipes so we need to encode that to our internally-used encoding (`KWSYS_ENCODING_DEFAULT_CODEPAGE`).
* Do not query CDash for versionZack Galbreath2016-11-081-19/+2
| | | | | | | | | | | | | | | | | | 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.
* cmCTestSubmitHandler: Remove redundant c_str()Daniel Pfeifer2016-11-051-1/+1
|
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* 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: fix include-what-you-use violationsDaniel Pfeifer2016-08-251-10/+12
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-5/+5
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-7/+7
|
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-1/+1
|
* Add CM_OVERRIDE to some functionsDaniel Pfeifer2016-06-271-3/+3
| | | | | | | 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-8/+7
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Merge topic 'size-empty'Brad King2016-06-031-2/+2
|\ | | | | | | | | c6220de2 Use the empty() method to check for emptyness.
| * Use the empty() method to check for emptyness.Daniel Pfeifer2016-06-021-2/+2
| | | | | | | | | | Apply fix-its from clang-tidy's readability-container-size-empty checker.
* | Simplify boolean expressionsDaniel Pfeifer2016-06-021-8/+1
|/ | | | | | 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.
* 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-825/+681
| | | | | | | | | | | | | 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-14/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Set Content-Type header for http file upload (#15774)Derek Bruening2015-10-121-0/+8
| | | | | Sets the Content-Type header for http file uploads to avoid running afoul of ModSecurity rules on the server.
* Port Global property interaction to cmState.Stephen Kelly2015-04-151-1/+2
|
* cmake: Remove the happy global property scope pattern.Stephen Kelly2015-04-151-1/+1
| | | | | | | | | Global properties are already global in scope, so remove the overload for specifying it and port users of the API. The call from cmMakefile::GetProperty can be simplified because the scope is only used during chaining, and there is no further chaining after processing global properties.
* ctest_submit: Add QUIET optionZack Galbreath2015-02-231-112/+127
| | | | | Specifying this option prevents CTest from printing any non-error messages to the console for this call to ctest_submit().
* ctest_submit: Escape URL components in CDASH_UPLOAD modeBill Hoffman2015-01-301-11/+14
| | | | Call curl_easy_escape on arguments sent to CDash upload.
* cmake: Use a default CA path when not using system curlBrad King2015-01-231-1/+2
| | | | | | | | | | | | | | | | | | | | When using system curl, we trust it to be configured with desired CA certs. When using our own build of curl, we use os-configured CA certs on Windows and OS X. On other systems, try to achieve this by searching for common CA cert locations. According to a brief investigation, the curl packages on popular Linux distros are currently configured as: * Arch: /etc/ssl/certs/ca-certificates.crt * Debian with OpenSSL: /etc/ssl/certs * Debian with GNU TLS: /etc/ssl/certs/ca-certificates.crt * Debian with NSS: /etc/ssl/certs/ca-certificates.crt * Fedora: /etc/pki/tls/certs/ca-bundle.crt * Gentoo with OpenSSL: /etc/ssl/certs * Gentoo without OpenSSL: /etc/ssl/certs/ca-certificates.crt Teach CMake and CTest to look for these paths and use them as a CA path or bundle when no other os-configured or user-specified CAs are available.
* ctest_submit: Make CDASH_UPLOAD mode arguments more strictBrad King2015-01-201-4/+10
| | | | | Disallow mixing of arguments from different command signatures. Extend the RunCMake.CTestSubmit test to cover such error cases.
* ctest_submit: Add CDASH_UPLOAD mode to upload files to CDashBill Hoffman2015-01-201-1/+160
| | | | | | This adds support for the new cdash API where arbitrary files can be uploaded to the CDash server. This CDash API communicates via json files so the json parser jsoncpp was added to the Utilities directory.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-5/+5
|
* Replace !foo.size() pattern with foo.empty().Stephen Kelly2015-01-181-4/+4
|
* Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-16/+16
|
* Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-15/+3
|
* Remove some unneeded c_str calls.Stephen Kelly2014-11-231-2/+2
|
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-11/+11
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* CTest: Allow / to be in the build name, and be consistent with the build nameBill Hoffman2014-08-181-1/+3
| | | | | | | | Prior to this change / was not allowed in the build name. This was tested with a CDash server and worked. In addition the safe build name was not used everywhere. This caused mismatched build names to be in the xml files going to CDash which caused different rows to be created for the same build.
* Encoding: Fix a few encoding problems with ctest.Clinton Stimpson2014-07-181-7/+8
| | | | | This also fixes some test failures on Windows when the name of the build directory contains non-ascii characters.