From 087740d326e7e18b29173aa22058649e906d79ee Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 20 Jun 2018 22:25:03 +0200 Subject: [PATCH] WIP: pass sub-process output through tl::Log in unit tests for proper XML escaping into JUnit files. --- src/pymod/unit_tests/pymod_tests.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pymod/unit_tests/pymod_tests.cc b/src/pymod/unit_tests/pymod_tests.cc index ef1a866aa..2f4989d80 100644 --- a/src/pymod/unit_tests/pymod_tests.cc +++ b/src/pymod/unit_tests/pymod_tests.cc @@ -28,12 +28,10 @@ #include #include - - int run_pymodtest (tl::TestBase * /*_this*/, const std::string &fn) { QProcess process; - process.setProcessChannelMode (QProcess::ForwardedChannels); + process.setProcessChannelMode (QProcess::MergedChannels); QStringList args; @@ -48,6 +46,9 @@ int run_pymodtest (tl::TestBase * /*_this*/, const std::string &fn) process.start (tl::to_qstring (STRINGIFY (PYTHON)), args); process.waitForFinished (-1); + + tl::info << process.readAll ().constData (); + return process.exitCode (); }