summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestUpdateHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | 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_update: Refactor internal APIs to support more failure casesBrad King2017-02-161-2/+2
| | | | | | Thread failure of VC tool commands through more APIs so that we can detect when they fail. Defer updating of the individual VC tool usage the future and just return true from them for now.
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+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-20/+5
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-2/+2
| | | | | | | | | | | | 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-281-1/+1
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-170/+160
| | | | | | | | | | | | | 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-7/+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-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove unused cmLocalGenerator include.Stephen Kelly2015-10-051-1/+0
|
* ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610)Brad King2015-06-111-2/+2
| | | | | | | Make RETURN_VALUE report -1 if the update command failed as the documentation claims. Also avoid reporting a ctest script-level failure if the update command fails because we still correctly administered the update step.
* cmCTestUpdateHandler: Port to cmXMLWriterDaniel Pfeifer2015-05-261-31/+32
|
* CTest: Fix locale used for VCS updatesNils Gladitz2015-04-131-41/+2
| | | | | | | | 6a661f06030b85b4484733375bbb0aa23eca7446 fixed the locale used for message output but at the same time broke the locale used for filename encodings. This commit preserves LC_CTYPE in the presence of LC_ALL.
* CTest: To enforce the C locale use LC_ALL instead of LC_MESSAGES.Nils Gladitz2015-02-271-12/+12
| | | | If LC_ALL is set it takes precedence over LC_MESSAGES.
* ctest_update: Add QUIET optionZack Galbreath2015-02-231-18/+21
|
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* Remove some unneeded c_str calls.Stephen Kelly2014-11-231-1/+1
|
* CTest: Allow / to be in the build name, and be consistent with the build nameBill Hoffman2014-08-181-2/+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.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-1/+1
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* ctest_update: Add support for Perforce p4 clientPedro Navarro2013-10-261-1/+25
| | | | | | | | | | | Teach the ctest_update implementation to use the p4 command-line client to perform updates and extract the list of changes. Add a CTest.UpdateP4 test like those that exist already for the other version control tools. Make the test available when p4 and the p4d server are found. During the test launch p4d in the background to serve a repository from the test directory. Then direct the client toward this server for the duration of the test.
* ctest_update: Report failure in Update.xmlBrad King2010-04-271-0/+1
| | | | | | Report in <UpdateReturnStatus> when the update command line returns non-zero. Otherwise the failure may be silently ignored since the error was previously recorded only in the local log file.
* Use literal quotes in Update.xml UpdateCommandBrad King2009-12-181-1/+2
| | | | | | Previously we escaped quotes in <UpdateCommand>...</UpdateCommand> values using '&quot;'. This is not necessary because the value is in xml CDATA and not an xml attribute.
* CTest: Move initial checkout to ctest_start()Brad King2009-11-241-35/+0
| | | | | | | | | | | | | | | | | | | | In CTest command-driven script mode we support starting without a source tree. Previously the ctest_start() command would do some initialization but could not do anything that required CTestConfig.cmake from the input source tree. Later, ctest_update() would run CTEST_CHECKOUT_COMMAND to create the source tree, and then re-initialize everything. This delayed-initialization approach led to many complicated cases of which only some worked. For example, the second initialization only worked correctly in Nightly mode and simply failed for Experimental and Continuous builds. A simpler solution is to run CTEST_CHECKOUT_COMMAND during ctest_start() and then have a single initialization path. In principle this change in behavior could break scripts that set the checkout command after ctest_start() but before ctest_update(). However, the convention we've always followed has been to set all variables before ctest_start(). See issue #9450.
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* ENH: Teach CTest to handle Mercurial repositoriesBrad King2009-07-101-1/+19
| | | | | | | | | | | This creates cmCTestHG to drive CTest Update handling on hg-based work trees. Currently we always update to the head of the remote tracking branch (hg pull), so the nightly start time is ignored for Nightly builds. A later change will address this. See issue #7879. Patch from Emmanuel Christophe. I modified the patch slightly for code style, to finish up some parsing details, and to fix the test.
* ENH: Teach CTest to handle Bazaar repositoriesBrad King2009-05-141-0/+18
| | | | | | | | This creates cmCTestBZR to drive CTest Update handling on bzr-based work trees. Currently we always update to the head of the remote tracking branch (bzr pull), so the nightly start time is ignored for Nightly builds. A later change will address this. Patch from Tom Vercauteren. See issue #6857.
* ENH: Teach CTest to handle git repositoriesBrad King2009-04-221-1/+19
| | | | | | | This creates cmCTestGIT to drive CTest Update handling on git-based work trees. Currently we always update to the head of the remote tracking branch (git pull), so the nightly start time is ignored for Nightly builds. A later change will address this. See issue #6994.
* BUG: Fix return value of ctest_updateBrad King2009-03-201-2/+3
| | | | | | | The CTest version control refactoring broke the value returned for the ctest_update command's RETURN_VALUE argument. The value is supposed to be the number of files updated, but the refactoring accidentally made it the number of locally modified files after the update.
* ENH: Refactor initial checkout into cmCTestVCBrad King2009-02-261-40/+6
| | | | | | | This adds cmCTestVC::InitialCheckout and uses it in cmCTestUpdateHandler to run the initial checkout command. The new implementation logs the command in the update log consistently with the rest of the new update implementation.
* ENH: Rewrite CTest Update implementationBrad King2009-02-251-637/+20
| | | | | | | | | | | | | | | This adds a new VCS update implementation to the cmCTestVC hierarchy and removes it from cmCTestUpdateHandler. The new implementation has the following advantages: - Factorized implementation instead of monolithic function - Logs vcs tool output as it is parsed (less memory, inline messages) - Uses one global svn log instead of one log per file - Reports changes on cvs branches (instead of latest trunk change) - Generates simpler Update.xml (only one Directory element per dir) Shared components of the new implementation appear in cmCTestVC and may be re-used by subclasses for other VCS tools in the future.
* ENH: Factor out VCS work tree revision checksBrad King2009-02-241-83/+11
| | | | | This moves checks of the work tree revision before and after update from cmCTestUpdateHandler::ProcessHandler into the cmCTestVC hierarchy.
* ENH: Factor out nightly start time computationBrad King2009-02-241-12/+1
| | | | | Move generation of the nightly start time string from cmCTestUpdateHandler::ProcessHandler into cmCTestVC.
* ENH: Factor out svn work tree cleanupBrad King2009-02-241-42/+3
| | | | | This removes work tree cleanup from cmCTestUpdateHandler and adds an interface for it in cmCTestVC with an implementation in cmCTestSVN.
* ENH: Add cmCTestCVS and cmCTestSVNBrad King2009-02-241-0/+17
| | | | | These cmCTestVC subclasses will implement interaction with CVS and SVN tools.
* ENH: Factor out VCS tool detectionBrad King2009-02-241-64/+93
| | | | | | | In cmCTestUpdateHandler, this factors out version control tool detection from the monolithic cmCTestUpdateHandler::ProcessHandler to separate methods. This also places priority on detection of the tool managing the source tree since using any other tool will cause errors.
* ENH: Factor out initial checkout methodBrad King2009-02-241-58/+65
| | | | | | This moves the initial checkout code from the monolithic cmCTestUpdateHandler::ProcessHandler to a separate method cmCTestUpdateHandler::InitialCheckout.
* ENH: Refactor quoting of VCS tool commandBrad King2009-02-231-11/+9
| | | | | | Previously we pre-quoted the command line tool path. This avoids it by quoting the command everywhere it is used, thus preserving access to the original, unquoted command.
* ENH: Remove generation of unused Update.xml partsBrad King2009-02-171-68/+7
| | | | | | | | | | This removes generation of some Update.xml content that is not used by any Dart1, Dart2, or CDash servers: - Revisions elements - Directory attribute of File elements - File elements within Author elements The content was generated only because the original Dart1 Tcl client generated it, but the content was never used.
* BUG: Fix svn update logic for modified filesBrad King2009-02-161-0/+4
| | | | | | | | | The main svn update parsing loop in cmCTestUpdateHandler previously had a logic error because the variable 'res' was not reset for each iteration. For a locally modified file it would report the update info for the previous non-modified file, or nothing if there was no previous file. This fixes the logic by setting variable 'res' in both control paths for each iteration. See issue #8168.
* STYLE: Fix spelling in cmCTestUpdateHandlerBrad King2009-02-161-9/+9
| | | | | | | This renames the variable 'numModiefied' to 'numModified' to fix its spelling. It also renames 'modifiedOrConflict' to 'notLocallyModified' to describe its purpose (rather than the opposite of its purpose). See issue #8168.
* ENH: Create cmXMLSafe to help escapes in XMLBrad King2009-02-051-19/+20
| | | | | | | This class provides easy syntax to efficiently insert blocks of data into XML documents with proper escapes. It replaces the old cmCTest::MakeXMLSafe and cmSystemTools::MakeXMLSafe methods which allocated extra memory instead of directly streaming the data.
* ENH: Divide CTest file submission list by partBrad King2009-01-121-1/+1
| | | | | | This splits the list of files for CTest to submit into those belonging to each part. The set is recombined just before submission. Later this will allow piecewise submissions.
* BUG: Manage LC_MESSAGES with an objectBrad King2009-01-061-25/+44
| | | | | | | This moves management of the LC_MESSAGES environment variable into an automatic variable. Previously if an error occurred the original environment value was not restored. This makes the fix to issue #5936 more robust.
* STYLE: Remove trailing whitespaceBrad King2009-01-061-3/+3
|
* BUG: use LC_MESSAGES = C instead of en_ENBill Hoffman2008-10-191-4/+4
|
* BUG: Fix recognition of files deleted from CVSBrad King2008-10-181-1/+8
| | | | | | | | | | | | The output of "cvs update" contains a line such as one of cvs update: `foo.txt' is no longer in the repository cvs update: foo.txt is no longer in the repository cvs update: warning: foo.txt is not (any longer) pertinent when file "foo.txt" has been removed in the version to which the update occurs. Previously only the first case would be recognized. This fixes the regular expression to match all these cases.
* ENH: play it safe and restore the value of LC_MESSAGESBill Hoffman2008-10-101-1/+17
|
* ENH: make sure LC_MESSAGES is en_EN so that we can parse the output of svn ↵Bill Hoffman2008-10-101-0/+8
| | | | and cvs
* BUG: undo fix for 7292 because a switched file should show up as an odd ↵Bill Hoffman2008-10-011-1/+1
| | | | thing on the dashbaord