1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +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:
Glenn Morris 2014-10-01 19:24:28 -04:00
parent 335e9627ca
commit e694e2a9b0
2 changed files with 17 additions and 4 deletions

View File

@ -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:

View File

@ -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)))