AutoTest: Tweak output handling

..to be able to distinguish between the output
channels. Some test frameworks use the stderr
stream for printing relevant output.
This is a preparation for coloring the output
correctly later on.

Change-Id: I3bfea9e552bde3621df99611a124b4f2d3b7d1da
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2019-11-06 14:25:16 +01:00
parent 2c7e769e31
commit e58f376068
5 changed files with 13 additions and 7 deletions

View File

@@ -34,6 +34,8 @@
namespace Autotest {
enum class OutputChannel { StdOut, StdErr };
class TestOutputReader : public QObject
{
Q_OBJECT
@@ -53,7 +55,7 @@ public:
QString id() const { return m_id; }
signals:
void newOutputLineAvailable(const QByteArray &outputLine);
void newOutputLineAvailable(const QByteArray &outputLine, OutputChannel channel);
protected:
virtual void processOutputLine(const QByteArray &outputLine) = 0;
virtual TestResultPtr createDefaultResult() const = 0;