mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
Test(git): set commit.gpgsign to false
If a user has run `git config --global commit.gpgsign true`, git-related tests fail since the test users do not exist and gpg cannot sign.
This commit is contained in:
@@ -19,6 +19,8 @@ message(" git = ${GIT}")
|
||||
set(AUTHOR_CONFIG "[user]
|
||||
\tname = Test Author
|
||||
\temail = testauthor@cmake.org
|
||||
[commit]
|
||||
\tgpgsign = false
|
||||
")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@@ -95,6 +95,7 @@ if(do_git_tests)
|
||||
GIT_TAG ${TEST_GIT_TAG}
|
||||
GIT_CONFIG "user.email=testauthor@cmake.org"
|
||||
"user.name=testauthor"
|
||||
"commit.gpgsign=false"
|
||||
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
||||
INSTALL_COMMAND ""
|
||||
|
@@ -20,6 +20,7 @@ function(initGitRepo workDir)
|
||||
execGitCommand("${workDir}" config user.email "testauthor@cmake.org")
|
||||
execGitCommand("${workDir}" config user.name testauthor)
|
||||
execGitCommand("${workDir}" config core.autocrlf false)
|
||||
execGitCommand("${workDir}" config commit.gpgsign false)
|
||||
execGitCommand("${workDir}" add CMakeLists.txt)
|
||||
execGitCommand("${workDir}" commit -m "Initial commit")
|
||||
endfunction()
|
||||
|
@@ -47,6 +47,7 @@ endfunction()
|
||||
execGitCommand(-c init.defaultBranch=master init)
|
||||
execGitCommand(config --add user.email "testauthor@cmake.org")
|
||||
execGitCommand(config --add user.name testauthor)
|
||||
execGitCommand(config commit.gpgsign "false")
|
||||
|
||||
# Create the initial repo structure
|
||||
execGitCommand(add firstFile.txt)
|
||||
|
Reference in New Issue
Block a user