summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2012-11-21 13:05:29 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2012-11-21 14:55:56 +0100
commit092ec158dd746c8dc096a69a347caa2170f6312a (patch)
tree55f0badd96253b6a098358b95b7fda40a333a0c2 /tests
parent8c90d9ef654332b66ffab73b8931f5bb156b43c1 (diff)
autotests: ensure existence of QProcess object
Change-Id: I93e8fcae0ca51517b0b369fe0750db0f8655cf22 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index c0801e9..44c3981 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -38,7 +38,7 @@ void ParserTest::initTestCase()
{
m_makefileFactory = new MakefileFactory;
m_preprocessor = 0;
- m_jomProcess = 0;
+ m_jomProcess = new QProcess(this);
m_bResetJomProcessEnvironment = false;
m_oldCurrentPath = QDir::currentPath();
QDir::setCurrent(SRCDIR "makefiles");
@@ -894,10 +894,7 @@ bool ParserTest::runJom(const QStringList &args, const QString &workingDirectory
oldWorkingDirectory = QDir::currentPath();
QDir::setCurrent(workingDirectory);
}
- if (!m_jomProcess) {
- m_jomProcess = new QProcess(this);
- m_jomProcess->setProcessChannelMode(QProcess::MergedChannels);
- }
+ m_jomProcess->setProcessChannelMode(QProcess::MergedChannels);
if (m_bResetJomProcessEnvironment) {
m_bResetJomProcessEnvironment = false;
m_jomProcess->setEnvironment(QStringList());
@@ -1029,10 +1026,6 @@ void ParserTest::environmentVariables_data()
void ParserTest::environmentVariables()
{
- if (!m_jomProcess)
- runJom(QStringList() << "/version"); // make sure the QProcess object exists
- QVERIFY(m_jomProcess);
-
QFETCH(QStringList, environment);
QFETCH(QStringList, arguments);
QFETCH(QString, expectedVar1);