[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-desktop/Plasma/5.1] kcms/lookandfeel/autotests: Fix test by removing old test install direct
From: David Edmundson <kde () davidedmundson ! co ! uk>
Date: 2014-11-30 22:38:12
Message-ID: E1XvD88-0004Md-S3 () scm ! kde ! org
[Download RAW message or body]
Git commit a83203867fe637c009dd14b37cab5e3680491097 by David Edmundson.
Committed on 08/10/2014 at 21:54.
Pushed by davidedmundson into branch 'Plasma/5.1'.
Fix test by removing old test install directory
cherry-pick 3d2cc92c303abb08cc57e231dfea236c6b2f6fe3
and cde78a83588ed5feed352a0243026e4f8e9b9348
just remove the test directory recursively, like other tests
we can't cleanly uninstall the package, if is not installed yet
M +10 -1 kcms/lookandfeel/autotests/kcmtest.cpp
http://commits.kde.org/plasma-desktop/a83203867fe637c009dd14b37cab5e3680491097
diff --git a/kcms/lookandfeel/autotests/kcmtest.cpp \
b/kcms/lookandfeel/autotests/kcmtest.cpp index e55b882..08fae14 100644
--- a/kcms/lookandfeel/autotests/kcmtest.cpp
+++ b/kcms/lookandfeel/autotests/kcmtest.cpp
@@ -23,6 +23,7 @@ along with this program. If not, see \
<http://www.gnu.org/licenses/>. #include <Plasma/Package>
#include <Plasma/PluginLoader>
#include <ksycoca.h>
+#include <KJob>
class KcmTest : public QObject
{
@@ -41,6 +42,7 @@ private Q_SLOTS:
private:
QDir m_configDir;
+ QDir m_dataDir;
KCMLookandFeel *m_KCMLookandFeel;
};
@@ -52,6 +54,9 @@ void KcmTest::initTestCase()
m_configDir = QDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation));
m_configDir.removeRecursively();
+ m_dataDir = QDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation));
+ m_dataDir.removeRecursively();
+
QVERIFY(m_configDir.mkpath("."));
const QString packagePath = QFINDTESTDATA("lookandfeel");
@@ -59,7 +64,10 @@ void KcmTest::initTestCase()
Plasma::Package p = \
Plasma::PluginLoader::self()->loadPackage("Plasma/LookAndFeel"); \
p.setPath(packagePath); QVERIFY(p.isValid());
- p.install(packagePath, \
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)+"/plasma/look-and-feel/");
+
+ const QString packageRoot = \
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)+"/plasma/look-and-feel/";
+ auto installJob = p.install(packagePath, packageRoot);
+ installJob->exec();
KConfig config("kdeglobals");
KConfigGroup cg(&config, "KDE");
@@ -72,6 +80,7 @@ void KcmTest::initTestCase()
void KcmTest::cleanupTestCase()
{
m_configDir.removeRecursively();
+ m_dataDir.removeRecursively();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic