Hide global qtlogging.ini from autotest

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 <thiago.macieira@intel.com>
Reviewed-by: Joni Jäntti <joni.jantti@qt.io>
bb10
Kai Koehne 2018-04-03 11:52:41 +02:00
parent 4b4870a12c
commit 50d301cfdd
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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");
}