mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tests: Create temporary directories in '/tmp'.
* tests/gpgscm/tests.scm (mkdtemp): Create temporary directories in '/tmp' on UNIX, or in '%Temp' on Windows. * tests/migrations/common.scm (run-test): Turn error into a warning. * tests/openpgp/defs.scm (start-agent): Likewise. -- This fixes the problem of GnuPG components being unable to communicate because of too long GnuPG home directories in important build environments like the Debian build servers despite the use of socket directories. This reverts d75d20909d9f60d33ffd210def92278c0f383aad. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
ceb4b24575
commit
06f1f163e9
@ -271,9 +271,11 @@
|
|||||||
;; generic name is used. Returns an absolute path.
|
;; generic name is used. Returns an absolute path.
|
||||||
(define (mkdtemp . components)
|
(define (mkdtemp . components)
|
||||||
(canonical-path (_mkdtemp (if (null? components)
|
(canonical-path (_mkdtemp (if (null? components)
|
||||||
(string-append "gpgscm-" (get-isotime) "-"
|
(path-join
|
||||||
(basename-suffix *scriptname* ".scm")
|
(if *win32* (getenv "Temp") "/tmp")
|
||||||
"-XXXXXX")
|
(string-append "gpgscm-" (get-isotime) "-"
|
||||||
|
(basename-suffix *scriptname* ".scm")
|
||||||
|
"-XXXXXX"))
|
||||||
(apply path-join components)))))
|
(apply path-join components)))))
|
||||||
|
|
||||||
(define-macro (with-temporary-working-directory . expressions)
|
(define-macro (with-temporary-working-directory . expressions)
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
(untar-armored src-tarball)
|
(untar-armored src-tarball)
|
||||||
(setenv "GNUPGHOME" (getcwd) #t)
|
(setenv "GNUPGHOME" (getcwd) #t)
|
||||||
|
|
||||||
(catch (fail "Creating socket directory failed (see README):" (car *error*))
|
(catch (log "Warning: Creating socket directory failed:" (car *error*))
|
||||||
(call-popen `(,gpgconf --create-socketdir) ""))
|
(call-popen `(,gpgconf --create-socketdir) ""))
|
||||||
(test (getcwd))
|
(test (getcwd))
|
||||||
(catch (log "Warning: Removing socket directory failed.")
|
(catch (log "Warning: Removing socket directory failed.")
|
||||||
|
@ -446,7 +446,7 @@
|
|||||||
(atexit (lambda ()
|
(atexit (lambda ()
|
||||||
(with-home-directory gnupghome
|
(with-home-directory gnupghome
|
||||||
(stop-agent)))))
|
(stop-agent)))))
|
||||||
(catch (fail "Creating socket directory failed (see README):" (car *error*))
|
(catch (log "Warning: Creating socket directory failed:" (car *error*))
|
||||||
(call-popen `(,(tool 'gpgconf) --create-socketdir) ""))
|
(call-popen `(,(tool 'gpgconf) --create-socketdir) ""))
|
||||||
(call-check `(,(tool 'gpg-connect-agent) --verbose
|
(call-check `(,(tool 'gpg-connect-agent) --verbose
|
||||||
,(string-append "--agent-program=" (tool 'gpg-agent)
|
,(string-append "--agent-program=" (tool 'gpg-agent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user