diff options
author | Christian Stenger <christian.stenger@qt.io> | 2018-08-29 12:33:15 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2018-09-04 06:06:33 +0000 |
commit | d058dcc326beee59b59e786d6448d9207eedd00e (patch) | |
tree | 45472a3b3d50a175972df62af90ed754f6cbc49c /src/plugins/autotest/quick | |
parent | d20b907b94d496a0205e87740a4ca083e9ae0e4b (diff) |
AutoTest: Filter out interfering environment variables
If there are environment variables that might interfere with
the test process filter them out before setting the environment
for the test process as they can - in the worst case - even
lead to being not able to execute the test application at all.
Task-number: QTCREATORBUG-21012
Change-Id: I4a2059cf527395498824a0914fd6c3203eca9bcf
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/autotest/quick')
-rw-r--r-- | src/plugins/autotest/quick/quicktestconfiguration.cpp | 5 | ||||
-rw-r--r-- | src/plugins/autotest/quick/quicktestconfiguration.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/autotest/quick/quicktestconfiguration.cpp b/src/plugins/autotest/quick/quicktestconfiguration.cpp index 47b77480396..024b2223c26 100644 --- a/src/plugins/autotest/quick/quicktestconfiguration.cpp +++ b/src/plugins/autotest/quick/quicktestconfiguration.cpp @@ -86,6 +86,11 @@ QStringList QuickTestConfiguration::argumentsForTestRunner(QStringList *omitted) return arguments; } +Utils::Environment QuickTestConfiguration::filteredEnvironment(const Utils::Environment &original) const +{ + return QTestUtils::prepareBasicEnvironment(original); +} + void QuickTestConfiguration::setUnnamedOnly(bool unnamedOnly) { m_unnamedOnly = unnamedOnly; diff --git a/src/plugins/autotest/quick/quicktestconfiguration.h b/src/plugins/autotest/quick/quicktestconfiguration.h index 7eca4cc1f01..286b891741c 100644 --- a/src/plugins/autotest/quick/quicktestconfiguration.h +++ b/src/plugins/autotest/quick/quicktestconfiguration.h @@ -37,7 +37,7 @@ public: TestOutputReader *outputReader(const QFutureInterface<TestResultPtr> &fi, QProcess *app) const override; QStringList argumentsForTestRunner(QStringList *omitted = nullptr) const override; - + Utils::Environment filteredEnvironment(const Utils::Environment &original) const override; void setUnnamedOnly(bool unnamedOnly); bool unnamedOnly() const { return m_unnamedOnly; } |