diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index c1ae1de..a07636d 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -61,5 +61,10 @@ ecm_add_tests( LINK_LIBRARIES KF5::ConfigGui Qt5::Test ) +# These tests do a global cleanup of ~/.qttest, so they can't run in parallel +set_tests_properties(kconfigcore-kconfigtest PROPERTIES RUN_SERIAL TRUE) +set_tests_properties(kconfigcore-kconfignokdehometest PROPERTIES RUN_SERIAL TRUE) +set_tests_properties(kconfiggui-kconfigguitest PROPERTIES RUN_SERIAL TRUE) + add_subdirectory(kconfig_compiler) diff --git a/autotests/kconfigskeletontest.cpp b/autotests/kconfigskeletontest.cpp index 898366c..0036a7e 100644 --- a/autotests/kconfigskeletontest.cpp +++ b/autotests/kconfigskeletontest.cpp @@ -35,6 +35,11 @@ QTEST_MAIN(KConfigSkeletonTest) #define WRITE_SETTING3 QFont("helvetica",14) #define WRITE_SETTING4 QString("KDE") +void KConfigSkeletonTest::initTestCase() +{ + QStandardPaths::setTestModeEnabled(true); +} + void KConfigSkeletonTest::init() { QFile::remove(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/kconfigskeletontestrc"); diff --git a/autotests/kconfigskeletontest.h b/autotests/kconfigskeletontest.h index 5cdcc9d..a5c63c9 100644 --- a/autotests/kconfigskeletontest.h +++ b/autotests/kconfigskeletontest.h @@ -27,6 +27,7 @@ class KConfigSkeletonTest : public QObject public: private Q_SLOTS: + void initTestCase(); void init(); void cleanup(); void testSimple();