1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

Skip hanging EasyPG tests on GnuPG 2.4

* test/lisp/epg-tests.el (epg-roundtrip-1, epg-roundtrip-2):
Skip tests on GnuPG 2.4.  (Bug#63256)
This commit is contained in:
Stefan Kangas 2023-08-29 00:48:06 +02:00
parent a5339933d0
commit db30b15079

View File

@ -111,14 +111,23 @@ jA0ECQMCdW8+qtS9Tin/0jUBO1/9Oz69BWPmtFKEeBM62WpFP4o1+bNzdxogdyeg
-----END PGP MESSAGE-----
")))))
(defun epg--gnupg-version-is-not-buggy ()
;; We need to skip some versions of GnuPG, as they make tests hang.
;; See Bug#63256 and https://dev.gnupg.org/T6481 as well as PROBLEMS.
;; Known bad versions for now are 2.4.1--2.4.3.
(not (string-match (rx bos "gpg (GnuPG) 2.4." (+ digit))
(shell-command-to-string "gpg --version"))))
(ert-deftest epg-roundtrip-1 ()
:expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) ; fixme
:expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) ; fixme
(skip-unless (epg--gnupg-version-is-not-buggy))
(with-epg-tests (:require-passphrase t)
(let ((cipher (epg-encrypt-string epg-tests-context "symmetric" nil)))
(should (equal "symmetric"
(epg-decrypt-string epg-tests-context cipher))))))
(ert-deftest epg-roundtrip-2 ()
(skip-unless (epg--gnupg-version-is-not-buggy))
(with-epg-tests (:require-passphrase t
:require-public-key t
:require-secret-key t)