From 056d5ec3aa9151da7e743526ac22c5946db28aaf Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 29 Jan 2018 00:24:09 +0100 Subject: [PATCH] Autotests: Clean test profile directory before each test --- autotests/autotests.h | 2 ++ src/lib/app/datapaths.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autotests/autotests.h b/autotests/autotests.h index 07c8953f3..149ee5e41 100644 --- a/autotests/autotests.h +++ b/autotests/autotests.h @@ -16,12 +16,14 @@ * along with this program. If not, see . * ============================================================ */ #include "mainapplication.h" +#include "qztools.h" #include #define FALKONTEST_MAIN(Test) \ int main(int argc, char **argv) \ { \ + QzTools::removeDir(QDir::tempPath() + QSL("/Falkon-test")); \ MainApplication::setTestModeEnabled(true); \ MainApplication app(argc, argv); \ QTEST_DISABLE_KEYPAD_NAVIGATION; \ diff --git a/src/lib/app/datapaths.cpp b/src/lib/app/datapaths.cpp index 0a4121230..b83fbd4dc 100644 --- a/src/lib/app/datapaths.cpp +++ b/src/lib/app/datapaths.cpp @@ -94,7 +94,7 @@ void DataPaths::init() } if (MainApplication::isTestModeEnabled()) { - m_paths[Config].append(QDir::tempPath() + QL1S("/QupZilla-test")); + m_paths[Config].append(QDir::tempPath() + QSL("/Falkon-test")); } else { m_paths[Config].append(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)); }