summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/mimetypes
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-14 15:34:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-17 14:14:42 +0000
commit696ea2fff15cf0f8c1016353cfcb93d1f368129c (patch)
tree6bdb64f60ead0de1a10be9c9d9bb589b28b36c3d /tests/auto/corelib/mimetypes
parent99b94aadf875c822afb6c2580e43355ac392ac92 (diff)
tst_qmimedatabase: Add some log output when running update-mime-database.
When running the test, one gets the impression that it hangs. Add some debug output including time to show what happens. Change-Id: Iac6b4f0518ecec62169bf2269a0a8ec9192da570 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/corelib/mimetypes')
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index a0edf29607..25b9be0881 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -35,6 +35,7 @@
#include "qstandardpaths.h"
+#include <QtCore/QElapsedTimer>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtCore/QTextStream>
@@ -765,16 +766,20 @@ static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDa
return false;
}
+ QElapsedTimer timer;
QProcess proc;
proc.setProcessChannelMode(QProcess::MergedChannels); // silence output
+ qDebug().noquote() << "runUpdateMimeDatabase: running" << umd << path << "...";
+ timer.start();
proc.start(umd, QStringList(path));
if (!proc.waitForStarted()) {
qWarning("Cannot start %s: %s",
qPrintable(umd), qPrintable(proc.errorString()));
return false;
}
- proc.waitForFinished();
- //qDebug() << "runUpdateMimeDatabase" << path;
+ const bool success = proc.waitForFinished();
+ qDebug().noquote() << "runUpdateMimeDatabase: done,"
+ << success << timer.elapsed() << "ms";
return true;
}