mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tests: Simplify test.
* tests/openpgp/issue2417.scm: Simplify. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
591d61d80f
commit
4dd4801bfa
@ -18,27 +18,15 @@
|
||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(load (with-path "defs.scm"))
|
||||
(setup-legacy-environment)
|
||||
(setup-environment)
|
||||
|
||||
(define old-home (getenv "GNUPGHOME"))
|
||||
(define keyfile (in-srcdir "samplekeys" "rsa-rsa-sample-1.asc"))
|
||||
|
||||
(define (touch file-name)
|
||||
(close (open file-name (logior O_WRONLY O_BINARY O_CREAT) #o600)))
|
||||
|
||||
(info "Checking robustness wrt empty databases in gnupghome (issue2417)...")
|
||||
|
||||
(lettmp
|
||||
;; Prepare some random key to import later.
|
||||
(keyfile)
|
||||
(pipe:do
|
||||
(pipe:gpg '(--export alpha))
|
||||
(pipe:write-to keyfile (logior O_WRONLY O_BINARY O_CREAT) #o600))
|
||||
|
||||
(with-temporary-working-directory
|
||||
(file-copy (path-join old-home "gpg.conf") "gpg.conf")
|
||||
(file-copy (path-join old-home "gpg-agent.conf") "gpg-agent.conf")
|
||||
(setenv "GNUPGHOME" "." #t)
|
||||
(touch "trustdb.gpg")
|
||||
(touch "pubring.gpg")
|
||||
(touch "pubring.kbx")
|
||||
(call-check `(,(tool 'GPG) --import ,keyfile))))
|
||||
(touch "trustdb.gpg")
|
||||
(touch "pubring.gpg")
|
||||
(touch "pubring.kbx")
|
||||
(call-check `(,(tool 'GPG) --import ,keyfile))
|
||||
|
Loading…
x
Reference in New Issue
Block a user