From d9f7a18ed88127e7f05d770d55118d1e928f3b3f Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 11 Apr 2016 17:46:03 +0200 Subject: Qt: Fix unit test by adding initial.test dep * lang/qt/tests/t-keylist.cpp: Verify that GNUPGHOME is set. * lang/qt/tests/initial.test: New dummy test. * lang/qt/tests/Makefile.am: Add dependency to initial.test -- Feels weird but this follows the pattern in tests/gpg/Makefile.am and solves the problem that the environment is dirty. --- lang/qt/tests/t-keylist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lang/qt/tests/t-keylist.cpp') diff --git a/lang/qt/tests/t-keylist.cpp b/lang/qt/tests/t-keylist.cpp index 626d0a7f..8aa59990 100644 --- a/lang/qt/tests/t-keylist.cpp +++ b/lang/qt/tests/t-keylist.cpp @@ -23,6 +23,12 @@ private Q_SLOTS: const QString kId = QLatin1String(keys.front().keyID()); Q_ASSERT (kId == QStringLiteral("2D727CC768697734")); } + + void initTestCase() + { + const QString gpgHome = qgetenv("GNUPGHOME"); + QVERIFY2(!gpgHome.isEmpty(), "GNUPGHOME environment variable is not set."); + } }; QTEST_MAIN(KeyListTest) -- cgit v1.2.3