summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-03-22 11:05:37 +0300
committerIvan Komissarov <ABBAPOH@gmail.com>2021-05-17 12:52:00 +0000
commit9a5667a8d19a05991c164bb03aacc9333525a59b (patch)
tree49e87dbe98ff5378cfea091a586ee5bfd47d578c /tests
parent6bf37bea6895cc0689a1c2bd0d73554ae657032d (diff)
downloadqbs-9a5667a8d19a05991c164bb03aacc9333525a59b.tar.gz
Print stderr and stdout in case of error
Change-Id: I72a1db91f4cce46e57af0b69d73ab0edff0fec28 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/tst_blackboxbase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackboxbase.cpp b/tests/auto/blackbox/tst_blackboxbase.cpp
index 0e383c831..ab77beee6 100644
--- a/tests/auto/blackbox/tst_blackboxbase.cpp
+++ b/tests/auto/blackbox/tst_blackboxbase.cpp
@@ -99,9 +99,12 @@ int TestBlackboxBase::runQbs(const QbsRunParameters &params)
if (!process.waitForStarted() || !process.waitForFinished(testTimeoutInMsecs())
|| process.exitStatus() != QProcess::NormalExit) {
m_qbsStderr = process.readAllStandardError();
+ m_qbsStdout = process.readAllStandardOutput();
if (!params.expectCrash) {
QTest::qFail("qbs did not run correctly", __FILE__, __LINE__);
qDebug("%s", qPrintable(process.errorString()));
+ qDebug("%s", m_qbsStderr.constData());
+ qDebug("%s", m_qbsStdout.constData());
}
return -1;
}