spack test: no gpg signing for git commits (#18454)
This commit is contained in:
		| @@ -55,7 +55,8 @@ def mock_pkg_git_repo(tmpdir_factory): | |||||||
|         git('add', '.') |         git('add', '.') | ||||||
|         git('config', 'user.email', 'testing@spack.io') |         git('config', 'user.email', 'testing@spack.io') | ||||||
|         git('config', 'user.name', 'Spack Testing') |         git('config', 'user.name', 'Spack Testing') | ||||||
|         git('commit', '-m', 'initial mock repo commit') |         git('-c', 'commit.gpgsign=false', 'commit', | ||||||
|  |             '-m', 'initial mock repo commit') | ||||||
| 
 | 
 | ||||||
|         # add commit with pkg-a, pkg-b, pkg-c packages |         # add commit with pkg-a, pkg-b, pkg-c packages | ||||||
|         mkdirp('pkg-a', 'pkg-b', 'pkg-c') |         mkdirp('pkg-a', 'pkg-b', 'pkg-c') | ||||||
| @@ -66,7 +67,8 @@ def mock_pkg_git_repo(tmpdir_factory): | |||||||
|         with open('pkg-b/package.py', 'w') as f: |         with open('pkg-b/package.py', 'w') as f: | ||||||
|             f.write(pkg_template.format(name='PkgC')) |             f.write(pkg_template.format(name='PkgC')) | ||||||
|         git('add', 'pkg-a', 'pkg-b', 'pkg-c') |         git('add', 'pkg-a', 'pkg-b', 'pkg-c') | ||||||
|         git('commit', '-m', 'add pkg-a, pkg-b, pkg-c') |         git('-c', 'commit.gpgsign=false', 'commit', | ||||||
|  |             '-m', 'add pkg-a, pkg-b, pkg-c') | ||||||
| 
 | 
 | ||||||
|         # remove pkg-c, add pkg-d |         # remove pkg-c, add pkg-d | ||||||
|         with open('pkg-b/package.py', 'a') as f: |         with open('pkg-b/package.py', 'a') as f: | ||||||
| @@ -77,7 +79,8 @@ def mock_pkg_git_repo(tmpdir_factory): | |||||||
|             f.write(pkg_template.format(name='PkgD')) |             f.write(pkg_template.format(name='PkgD')) | ||||||
|         git('add', 'pkg-d') |         git('add', 'pkg-d') | ||||||
|         git('rm', '-rf', 'pkg-c') |         git('rm', '-rf', 'pkg-c') | ||||||
|         git('commit', '-m', 'change pkg-b, remove pkg-c, add pkg-d') |         git('-c', 'commit.gpgsign=false', 'commit', | ||||||
|  |             '-m', 'change pkg-b, remove pkg-c, add pkg-d') | ||||||
| 
 | 
 | ||||||
|     with spack.repo.swap(mock_repo): |     with spack.repo.swap(mock_repo): | ||||||
|         yield mock_repo_packages |         yield mock_repo_packages | ||||||
|   | |||||||
| @@ -867,7 +867,8 @@ def mock_git_repository(tmpdir_factory): | |||||||
|             submodule_file = 'r0_file_{0}'.format(submodule_count) |             submodule_file = 'r0_file_{0}'.format(submodule_count) | ||||||
|             repodir.ensure(submodule_file) |             repodir.ensure(submodule_file) | ||||||
|             git('add', submodule_file) |             git('add', submodule_file) | ||||||
|             git('commit', '-m', 'mock-git-repo r0 {0}'.format(submodule_count)) |             git('-c', 'commit.gpgsign=false', 'commit', | ||||||
|  |                 '-m', 'mock-git-repo r0 {0}'.format(submodule_count)) | ||||||
| 
 | 
 | ||||||
|     tmpdir = tmpdir_factory.mktemp('mock-git-repo-dir') |     tmpdir = tmpdir_factory.mktemp('mock-git-repo-dir') | ||||||
|     tmpdir.ensure(spack.stage._source_path_subdir, dir=True) |     tmpdir.ensure(spack.stage._source_path_subdir, dir=True) | ||||||
| @@ -887,7 +888,7 @@ def mock_git_repository(tmpdir_factory): | |||||||
|         r0_file = 'r0_file' |         r0_file = 'r0_file' | ||||||
|         repodir.ensure(r0_file) |         repodir.ensure(r0_file) | ||||||
|         git('add', r0_file) |         git('add', r0_file) | ||||||
|         git('commit', '-m', 'mock-git-repo r0') |         git('-c', 'commit.gpgsign=false', 'commit', '-m', 'mock-git-repo r0') | ||||||
| 
 | 
 | ||||||
|         branch = 'test-branch' |         branch = 'test-branch' | ||||||
|         branch_file = 'branch_file' |         branch_file = 'branch_file' | ||||||
| @@ -901,13 +902,13 @@ def mock_git_repository(tmpdir_factory): | |||||||
|         git('checkout', branch) |         git('checkout', branch) | ||||||
|         repodir.ensure(branch_file) |         repodir.ensure(branch_file) | ||||||
|         git('add', branch_file) |         git('add', branch_file) | ||||||
|         git('commit', '-m' 'r1 test branch') |         git('-c', 'commit.gpgsign=false', 'commit', '-m' 'r1 test branch') | ||||||
| 
 | 
 | ||||||
|         # Check out a second branch and tag it |         # Check out a second branch and tag it | ||||||
|         git('checkout', tag_branch) |         git('checkout', tag_branch) | ||||||
|         repodir.ensure(tag_file) |         repodir.ensure(tag_file) | ||||||
|         git('add', tag_file) |         git('add', tag_file) | ||||||
|         git('commit', '-m' 'tag test branch') |         git('-c', 'commit.gpgsign=false', 'commit', '-m' 'tag test branch') | ||||||
| 
 | 
 | ||||||
|         tag = 'test-tag' |         tag = 'test-tag' | ||||||
|         git('tag', tag) |         git('tag', tag) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Adam J. Stewart
					Adam J. Stewart