summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-06-10 10:03:11 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-06-10 11:10:25 +0200
commit3a4d4645684f58b86b0c1be9eb1897aae12101cb (patch)
tree52d439e391b17f1693446de4e43c921dbd94cb17 /tests
parent9181a213d9a251094cf7345f15e7f81aa6bb5ee9 (diff)
downloadqbs-3a4d4645684f58b86b0c1be9eb1897aae12101cb.tar.gz
fix output handling in TestBlackbox::runQbs
Change-Id: Ia0eaaf3c0711b4396fa68dfda373b0a91ba29a63 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index f137c5a3a..f680bac13 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -90,8 +90,10 @@ int TestBlackbox::runQbs(const QbsRunParameters &params)
m_qbsStdout = process.readAllStandardOutput();
if ((process.exitStatus() != QProcess::NormalExit
|| process.exitCode() != 0) && !params.expectFailure) {
- qDebug("%s", m_qbsStderr.constData());
- qDebug("%s", process.readAllStandardOutput().constData());
+ if (!m_qbsStderr.isEmpty())
+ qDebug("%s", m_qbsStderr.constData());
+ if (!m_qbsStdout.isEmpty())
+ qDebug("%s", m_qbsStdout.constData());
}
return process.exitCode();
}