Commit 4f0aadb3 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Improve cleanup after tests

* Kill all running gpg daemons, e.g. gpg-agent
* Unset GNUPGHOME environment variable

GnuPG-bug-id: 5283
parent 68fda099
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <Libkleo/KeyResolverCore> #include <Libkleo/KeyResolverCore>
#include <QObject> #include <QObject>
#include <QProcess>
#include <QTest> #include <QTest>
#include <gpgme++/key.h> #include <gpgme++/key.h>
...@@ -90,7 +91,11 @@ private Q_SLOTS: ...@@ -90,7 +91,11 @@ private Q_SLOTS:
QVERIFY(mKeyCache.use_count() == 1); QVERIFY(mKeyCache.use_count() == 1);
mKeyCache.reset(); mKeyCache.reset();
// kill all running gpg daemons
(void)QProcess::execute("gpgconf", {"--kill", "all"});
mGnupgHome.reset(); mGnupgHome.reset();
qunsetenv("GNUPGHOME");
} }
void test_verify_test_keys() void test_verify_test_keys()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment