]> git.notmuchmail.org Git - notmuch/commitdiff
test: check openssl prequisite for add_gpgsm_home
authorDavid Bremner <david@tethera.net>
Tue, 8 Jun 2021 19:39:10 +0000 (16:39 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 8 Jun 2021 20:15:46 +0000 (17:15 -0300)
This is a fix for the test failures reported by Dan Čermák [1].

It is more robust to check for the prerequisite inside the function
that uses it, rather than in every test file that calls the function.

[1]: id:87k0n4fqgm.fsf@tethera.net

test/test-lib.sh

index 4c9f2a2103e32a18c2c14dc257669300ecbe4d6f..862c6bc97a4d98cb86e69f863044c8ae803225d1 100644 (file)
@@ -136,6 +136,8 @@ add_gnupg_home ()
 
 add_gpgsm_home ()
 {
 
 add_gpgsm_home ()
 {
+    test_require_external_prereq openssl
+
     local fpr
     [ -e "$GNUPGHOME/gpgsm.conf" ] && return
     _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }
     local fpr
     [ -e "$GNUPGHOME/gpgsm.conf" ] && return
     _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; }