]> git.eshelyaron.com Git - emacs.git/commitdiff
Skip hanging EasyPG tests on GnuPG 2.4
authorStefan Kangas <stefankangas@gmail.com>
Mon, 28 Aug 2023 22:48:06 +0000 (00:48 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 28 Aug 2023 22:48:54 +0000 (00:48 +0200)
* test/lisp/epg-tests.el (epg-roundtrip-1, epg-roundtrip-2):
Skip tests on GnuPG 2.4.  (Bug#63256)

test/lisp/epg-tests.el

index 3659a922fe34db2635aaea0c190e179914d5112e..ed9da90c02941b0bbdbd228b385f5b6858e60ce6 100644 (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)