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/a83203867fe637c009dd14b37cab5e3680491= 097 diff --git a/kcms/lookandfeel/autotests/kcmtest.cpp b/kcms/lookandfeel/auto= tests/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 . #include #include #include +#include = 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 =3D QDir(QStandardPaths::writableLocation(QStandardPaths::= ConfigLocation)); m_configDir.removeRecursively(); = + m_dataDir =3D QDir(QStandardPaths::writableLocation(QStandardPaths::Ge= nericDataLocation)); + m_dataDir.removeRecursively(); + QVERIFY(m_configDir.mkpath(".")); = const QString packagePath =3D QFINDTESTDATA("lookandfeel"); @@ -59,7 +64,10 @@ void KcmTest::initTestCase() Plasma::Package p =3D Plasma::PluginLoader::self()->loadPackage("Plasm= a/LookAndFeel"); p.setPath(packagePath); QVERIFY(p.isValid()); - p.install(packagePath, QStandardPaths::writableLocation(QStandardPaths= ::GenericDataLocation)+"/plasma/look-and-feel/"); + + const QString packageRoot =3D QStandardPaths::writableLocation(QStanda= rdPaths::GenericDataLocation)+"/plasma/look-and-feel/"; + auto installJob =3D 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(); } = =20