[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kservice] autotests: Fix test on CI where not all servicetypes are available.
From: David Faure <faure () kde ! org>
Date: 2014-12-31 22:35:39
Message-ID: E1Y6Rrf-0007Cy-Ce () scm ! kde ! org
[Download RAW message or body]
Git commit 05d316940da23efb2b8e80f70cdb76bc324780b2 by David Faure.
Committed on 31/12/2014 at 22:34.
Pushed by dfaure into branch 'master'.
Fix test on CI where not all servicetypes are available.
M +11 -9 autotests/ksycocadicttest.cpp
http://commits.kde.org/kservice/05d316940da23efb2b8e80f70cdb76bc324780b2
diff --git a/autotests/ksycocadicttest.cpp b/autotests/ksycocadicttest.cpp
index 2808376..d5e59d1 100644
--- a/autotests/ksycocadicttest.cpp
+++ b/autotests/ksycocadicttest.cpp
@@ -77,21 +77,23 @@ void KSycocaDictTest::testStandardDict()
runKBuildSycoca();
}
=
- if (!KServiceType::serviceType("KCModule")) {
- QSKIP("Missing servicetypes");
- }
-
QStringList serviceTypes;
serviceTypes << "KUriFilter/Plugin"
<< "KDataTool"
<< "KCModule"
<< "KScan/KScanDialog"
- << "Browser/View";
-
- if (KServiceType::serviceType("Plasma/Applet")) {
- serviceTypes << "Plasma/Applet"
- << "Plasma/Runner";
+ << "Browser/View"
+ << "Plasma/Applet"
+ << "Plasma/Runner";
+
+ // Skip servicetypes that are not installed
+ QMutableListIterator<QString> it(serviceTypes);
+ while (it.hasNext()) {
+ if (!KServiceType::serviceType(it.next())) {
+ it.remove();
+ }
}
+ //qDebug() << serviceTypes;
=
QBENCHMARK {
QByteArray buffer;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic