diff options
Diffstat (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp')
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 94002ec75b..0806077031 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -543,6 +543,7 @@ static QProcessEnvironment processEnvironment() static QProcessEnvironment result; if (result.isEmpty()) { const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment(); + const bool preserveLibPath = qEnvironmentVariableIsSet("QT_PRESERVE_TESTLIB_PATH"); foreach (const QString &key, systemEnvironment.keys()) { const bool useVariable = key == QLatin1String("PATH") || key == QLatin1String("QT_QPA_PLATFORM") #if defined(Q_OS_QNX) @@ -557,6 +558,8 @@ static QProcessEnvironment processEnvironment() #ifdef __COVERAGESCANNER__ || key == QLatin1String("QT_TESTCOCOON_ACTIVE") #endif + || ( preserveLibPath && (key == QLatin1String("QT_PLUGIN_PATH") + || key == QLatin1String("LD_LIBRARY_PATH"))) ; if (useVariable) result.insert(key, systemEnvironment.value(key)); |