diff --git a/tests/clean-socketdir b/tests/clean-socketdir index ccd454e..7e3bcb8 100755 --- a/tests/clean-socketdir +++ b/tests/clean-socketdir @@ -1,19 +1,21 @@ #!/bin/sh # We do the clean-up only when the tests are run with GNUPGHOME # set to the tests directory (which is the default). If the user # saw fit to override TESTS_ENVIRONMENT to use another home, we # must assume she knows what she is doing. +[ "$GNUPGHOME" = "$HOME/.gnupg" ] && exit 0 + if [ "$GNUPGHOME" = "`/bin/pwd`" ]; then socketdir=`gpgconf --list-dirs socketdir` if [ -d "$socketdir" ]; then rm -f $socketdir/S.* rmdir $socketdir || true fi rm -f pubring.kbx reader_*.status if [ -d private-keys-v1.d ]; then rm -f private-keys-v1.d/*.key rmdir private-keys-v1.d fi fi