mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-30 19:53:09 +00:00
package-test tweaks for hydra
* test/automated/package-test.el (with-package-test, package-test-signed): Also set HOME to a temp value, in case the real one is absent (e.g. hydra) or read-only. (package-test-signed): Use skip-unless rather than expected-result. Fixes: debbugs:18575
This commit is contained in:
parent
335e9627ca
commit
e694e2a9b0
@ -1,3 +1,10 @@
|
||||
2014-10-01 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* automated/package-test.el (with-package-test, package-test-signed):
|
||||
Also set HOME to a temp value, in case the real one is absent (e.g.
|
||||
hydra) or read-only. (Bug#18575)
|
||||
(package-test-signed): Use skip-unless rather than expected-result.
|
||||
|
||||
2014-09-01 Fabián Ezequiel Gallina <fgallina@gnu.org>
|
||||
|
||||
* automated/python-tests.el:
|
||||
|
@ -89,6 +89,8 @@
|
||||
"Set up temporary locations and variables for testing."
|
||||
(declare (indent 1))
|
||||
`(let* ((package-test-user-dir (make-temp-file "pkg-test-user-dir-" t))
|
||||
(process-environment (cons (format "HOME=%s" package-test-user-dir)
|
||||
process-environment))
|
||||
(package-user-dir package-test-user-dir)
|
||||
(package-archives `(("gnu" . ,package-test-data-dir)))
|
||||
(old-yes-no-defn (symbol-function 'yes-or-no-p))
|
||||
@ -360,11 +362,15 @@ Must called from within a `tar-mode' buffer."
|
||||
|
||||
(ert-deftest package-test-signed ()
|
||||
"Test verifying package signature."
|
||||
:expected-result (condition-case nil
|
||||
(progn
|
||||
(skip-unless (ignore-errors
|
||||
(let ((homedir (make-temp-file "package-test" t)))
|
||||
(unwind-protect
|
||||
(let ((process-environment
|
||||
(cons (format "HOME=%s" homedir)
|
||||
process-environment)))
|
||||
(epg-check-configuration (epg-configuration))
|
||||
:passed)
|
||||
(error :failed))
|
||||
t)
|
||||
(delete-directory homedir t)))))
|
||||
(let* ((keyring (expand-file-name "key.pub" package-test-data-dir))
|
||||
(package-test-data-dir
|
||||
(expand-file-name "data/package/signed" package-test-file-dir)))
|
||||
|
Loading…
Reference in New Issue
Block a user