Changeset View
Changeset View
Standalone View
Standalone View
tests/openpgp/defs.scm
Context not available. | |||||
(create-gpghome) | (create-gpghome) | ||||
(start-agent)) | (start-agent)) | ||||
(define (setup-environment-no-atexit) | |||||
(create-gpghome) | |||||
(start-agent #t)) | |||||
(define (create-sample-files) | (define (create-sample-files) | ||||
(log "Creating sample data files") | (log "Creating sample data files") | ||||
(for-each | (for-each | ||||
Context not available. | |||||
(preset-passphrases)) | (preset-passphrases)) | ||||
;; Create the socket dir and start the agent. | ;; Create the socket dir and start the agent. | ||||
(define (start-agent) | (define (start-agent . args) | ||||
(log "Starting gpg-agent...") | (log "Starting gpg-agent...") | ||||
(let ((gnupghome (getenv "GNUPGHOME"))) | (let ((gnupghome (getenv "GNUPGHOME"))) | ||||
(atexit (lambda () | (if (null? args) | ||||
(with-home-directory gnupghome | (atexit (lambda () | ||||
(stop-agent))))) | (with-home-directory gnupghome | ||||
(stop-agent)))))) | |||||
(catch (log "Warning: Creating socket directory failed:" (car *error*)) | (catch (log "Warning: Creating socket directory failed:" (car *error*)) | ||||
(gpg-conf '--create-socketdir)) | (gpg-conf '--create-socketdir)) | ||||
(call-check `(,(tool 'gpg-connect-agent) --verbose | (call-check `(,(tool 'gpg-connect-agent) --verbose | ||||
Context not available. |