2015-01-16 13:44:24 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2015-01-16 13:44:24 +01:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** This file is part of Qt Creator.
|
2015-01-16 13:44:24 +01:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
2015-01-16 13:44:24 +01:00
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-22 10:37:55 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2015-01-16 13:44:24 +01:00
|
|
|
**
|
2016-01-22 10:37:55 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2015-01-16 13:44:24 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2015-01-16 13:44:24 +01:00
|
|
|
|
2015-02-18 15:40:32 +01:00
|
|
|
#include "testresult.h"
|
2015-01-16 13:44:24 +01:00
|
|
|
|
2016-01-19 14:24:09 +01:00
|
|
|
#include <QFutureInterface>
|
2015-01-16 13:44:24 +01:00
|
|
|
#include <QObject>
|
2016-05-11 13:02:42 +02:00
|
|
|
#include <QProcess>
|
2015-01-16 13:44:24 +01:00
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2015-12-09 09:46:33 +01:00
|
|
|
class TestOutputReader : public QObject
|
2015-01-16 13:44:24 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2016-02-25 13:02:31 +01:00
|
|
|
TestOutputReader(const QFutureInterface<TestResultPtr> &futureInterface,
|
2016-01-26 17:24:11 +01:00
|
|
|
QProcess *testApplication, const QString &buildDirectory);
|
2016-01-20 08:26:10 +01:00
|
|
|
|
2016-07-21 10:08:11 +02:00
|
|
|
virtual void processOutput(const QByteArray &outputLine) = 0;
|
|
|
|
|
virtual void processStdError(const QByteArray &output);
|
2016-07-21 16:02:42 +02:00
|
|
|
|
|
|
|
|
protected:
|
2016-02-25 13:02:31 +01:00
|
|
|
QFutureInterface<TestResultPtr> m_futureInterface;
|
2016-01-20 08:26:10 +01:00
|
|
|
QProcess *m_testApplication; // not owned
|
2016-01-26 17:24:11 +01:00
|
|
|
QString m_buildDir;
|
2016-01-20 08:26:10 +01:00
|
|
|
};
|
|
|
|
|
|
2015-01-16 13:44:24 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|