1
0
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:
Eisuke Kawashima
2025-06-22 01:31:07 +09:00
parent 076c4d01ae
commit db7c04dfb2
4 changed files with 5 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ message(" git = ${GIT}")
set(AUTHOR_CONFIG "[user]
\tname = Test Author
\temail = testauthor@cmake.org
[commit]
\tgpgsign = false
")
#-----------------------------------------------------------------------------

View File

@@ -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 ""

View File

@@ -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()

View File

@@ -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)