diff options
| author | Andre Heinecke <[email protected]> | 2016-09-19 08:01:19 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2016-09-19 08:01:19 +0000 | 
| commit | d438cb59a068b6f076e6bd70d3a2c46bc05ccb5c (patch) | |
| tree | 21cc00a602942c8004675de2b0c05ca76b48e338 /lang | |
| parent | doc: Mention language bindings in the manual. (diff) | |
| download | gpgme-d438cb59a068b6f076e6bd70d3a2c46bc05ccb5c.tar.gz gpgme-d438cb59a068b6f076e6bd70d3a2c46bc05ccb5c.zip | |
qt: Add debug output for testTofuPolicy
* lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add
debug output.
--
The debug output is only emitted before a failure of the
test in case a keylisting of [email protected] fails which
it should never do.
Diffstat (limited to '')
| -rw-r--r-- | lang/qt/tests/t-tofuinfo.cpp | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/lang/qt/tests/t-tofuinfo.cpp b/lang/qt/tests/t-tofuinfo.cpp index f40bf21d..d76ff7b7 100644 --- a/lang/qt/tests/t-tofuinfo.cpp +++ b/lang/qt/tests/t-tofuinfo.cpp @@ -299,6 +299,26 @@ private Q_SLOTS:          auto result = job->exec(QStringList() << QStringLiteral("[email protected]"),                                                   false, keys); +        if (keys.empty()) { +            qDebug() << "[email protected] not found"; +            qDebug() << "Error: " << result.error().asString(); +            const auto homedir = QString::fromLocal8Bit(qgetenv("GNUPGHOME")); +            qDebug() << "Homedir is: " << homedir; +            QFileInfo fi(homedir + "/pubring.gpg"); +            qDebug () << "pubring exists: " << fi.exists() << " readable? " +                      << fi.isReadable() << " size: " << fi.size(); +            QFileInfo fi2(homedir + "/pubring.kbx"); +            qDebug () << "keybox exists: " << fi2.exists() << " readable? " +                      << fi2.isReadable() << " size: " << fi2.size(); + +            result = job->exec(QStringList(), false, keys); +            foreach (const auto key, keys) { +                qDebug() << "Key: " << key.userID(0).name() << " <" +                         << key.userID(0).email() +                         << ">\n fpr: " << key.primaryFingerprint(); +            } +        } +        Q_ASSERT(!result.error());          Q_ASSERT(!keys.empty());          auto key = keys[0];          Q_ASSERT(!key.isNull()); | 
