From 50d301cfdd30f13d96b95a038d618407d6c71b30 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 3 Apr 2018 11:52:41 +0200 Subject: Hide global qtlogging.ini from autotest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not let a global qtlogging.ini interfere with an autotest. This works around an issue on Ubuntu 17.10 Task-number: QTBUG-67385 Change-Id: I0d02835eb7a561b43fe0b98f4383c170c6d51303 Reviewed-by: Thiago Macieira Reviewed-by: Joni Jäntti --- tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp | 1 + tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'tests/auto/corelib/io') diff --git a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp index 571288675e..11a9b3f189 100644 --- a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp +++ b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp @@ -203,6 +203,7 @@ private: private slots: void initTestCase() { + qputenv("XDG_CONFIG_DIRS", "/does/not/exist"); qputenv("QT_MESSAGE_PATTERN", QByteArray("%{category}: %{type},%{message}")); oldMessageHandler = qInstallMessageHandler(myCustomMessageHandler); // Create configuration diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp index a74ea3a89e..5b61a6007d 100644 --- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp +++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp @@ -50,6 +50,7 @@ private slots: { // ensure a clean environment QStandardPaths::setTestModeEnabled(true); + qputenv("XDG_CONFIG_DIRS", "/does/not/exist"); qunsetenv("QT_LOGGING_CONF"); qunsetenv("QT_LOGGING_RULES"); } -- cgit v1.2.3