summaryrefslogtreecommitdiffstats
path: root/Tests/CTestUpdateGIT.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* Use string(APPEND) in TestsDaniel Pfeifer2016-07-271-1/+1
| | | | | | | Automate with: find Tests -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Tests: Simplify CTest.UpdateGIT repo path constructionBrad King2015-12-101-19/+11
| | | | | | | Avoid constructing full paths to .git repositories in the test. Use relative paths and let Git convert them to absolute paths internally. This is simpler and also avoids trouble with various absolute path root component conventions on Windows (`c:/`, `/c/`, `/cygdrive/c/`).
* ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610)Brad King2015-06-111-0/+20
| | | | | | | 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.
* Tests: Simplify CTest.UpdateGIT QUIET mode testBrad King2015-06-111-12/+3
| | | | | Parameterize the dashboard script generation to configure custom content. Also move state cleanup from previous test back to its block.
* ctest_update: Add QUIET optionZack Galbreath2015-02-231-0/+33
|
* ctest_update: Add CTEST_UPDATE_VERSION_ONLY option to only note the versionBill Hoffman2014-08-181-0/+17
| | | | | | | This allows ctest_update to get the current version without actually changing the repository. This is useful when using Jenkins or an external project to update the source to a specific version, but you still want the current version to show up in CDash.
* CTest: Fix ctest_update with 'HEAD' file in source treeBrad King2013-02-281-4/+6
| | | | | Add the '--' command-line separator to make the HEAD reference unambiguous. Extend the CTest.UpdateGIT test to cover this case.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-2/+2
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Make CTest.UpdateGIT robust to Git safecrlf on WindowsBrad King2012-06-201-0/+3
| | | | | | | If the user has configured 'core.autocrlf' and 'core.safecrlf' then 'git submodule add' will fail to 'git add' the '.gitmodules' file because it has LF newlines, at least as of Git 1.7.11. Disable 'core.safecrlf' in our test repository to avoid the problem.
* Merge topic 'ctest-git-flexibility'Brad King2010-08-031-0/+5
|\ | | | | | | | | | | | | a7319cf ctest_update: Run 'git submodule' at top level 7bf8dc1 ctest_update: Support ".git file" work trees 65cb72f ctest_update: Abort if Git FETCH_HEAD has no candidates
| * ctest_update: Support ".git file" work treesBrad King2010-07-261-0/+5
| | | | | | | | | | | | | | Commit c3781efb (Support Git upstream branch rewrites, 2010-06-08) assumed that ".git/FETCH_HEAD" exists inside the source tree. Fix the implementation to handle a work tree using a ".git file" to link to its repository. Use "git rev-parse --git-dir" to locate the real .git dir.
* | CTest: Parse empty Git commits correctlyBrad King2010-06-231-2/+18
|/ | | | | | | Git's diff-tree format has no '\n'-terminated blank line at the end of its commit message body block if there are no diff lines. Instead the message body is terminated by '\0' and there is no diff section. Teach CTest to parse the format in this case.
* ctest_update: Support Git upstream branch rewritesBrad King2010-06-081-0/+2
| | | | | | | | | | | | | Use 'git fetch' followed by 'git reset' to update the source tree. This is better than 'git pull' because it can handle a rewritten upstream branch and does not leave local modifications. After fetch, parse FETCH_HEAD to find the merge head that 'git pull' would choose to track the upstream branch. Then reset to the selected head. In the normal fast-forward case the behavior remains unchanged. However, now local modifications and commits will be erased, and upstream rewrites are handled smoothly. This ensures that the upstream branch is tested as expected.
* ctest_update: Support custom Git update commandBrad King2010-06-081-9/+44
| | | | | Define CTest configuration variable CTEST_GIT_UPDATE_CUSTOM to set a custom command line for updating Git-managed source trees.
* Generalize CTest.Update* test dashboard script helpersBrad King2010-06-081-2/+2
| | | | | | | Teach (create|run)_dashboard_script macros to treat the argument as the name of a build tree. Append '.cmake' to generate the dashboard script name. This allows future re-use of the macros for multiple test scripts.
* Teach ctest_update about Git submodulesBrad King2010-05-041-0/+69
| | | | | | | | | | | Git does not automatically checkout the matching version of a submodule when it checks out a new version of the parent project in the work tree. If the submodule reference changed in the parent project then we were reporting the submodule path as a local modification. Work around the problem in ctest_update using "git submodule update" after "git pull". For projects with no submodules this is a no-op. See issue #10662. Also add a submodule to the test project for CTest.UpdateGIT to test the work-around.
* Teach CTest.UpdateGIT test to fake file timestampBrad King2010-02-091-0/+6
| | | | | | | We wrap the git executable in a shell script that touches one source file after 'git pull'. This makes the file newer than the index even though it has not actually changed. If CTest does not refresh the index properly then the test will fail with a bogus modified file.
* Make CTest.UpdateGIT robust to user git configBrad King2009-09-011-0/+7
| | | | | | | Part of this test does "git pull" on a dirty work tree. We need to make sure that 'branch.master.rebase' is false for the test repository. Otherwise if it is true in the user configuration then pull will refuse to rebase and the test will fail.
* BUG: Fix CTest.UpdateGIT test for older gitBrad King2009-04-231-1/+1
| | | | | Older git versions do not support 'git init --bare', so we instead use the more proper 'git --bare init'.
* ENH: Teach CTest to handle git repositoriesBrad King2009-04-221-0/+174
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.