2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2018-12-07 10:00:23 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../testoutputreader.h"
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class BoostTestResult;
|
|
|
|
|
enum class LogLevel;
|
|
|
|
|
enum class ReportLevel;
|
|
|
|
|
|
|
|
|
|
class BoostTestOutputReader : public TestOutputReader
|
|
|
|
|
{
|
2019-06-26 14:41:37 +02:00
|
|
|
Q_OBJECT
|
2018-12-07 10:00:23 +01:00
|
|
|
public:
|
|
|
|
|
BoostTestOutputReader(const QFutureInterface<TestResultPtr> &futureInterface,
|
2022-06-10 10:18:34 +02:00
|
|
|
Utils::QtcProcess *testApplication, const Utils::FilePath &buildDirectory,
|
2021-05-26 15:50:03 +02:00
|
|
|
const Utils::FilePath &projectFile, LogLevel log, ReportLevel report);
|
2018-12-07 10:00:23 +01:00
|
|
|
protected:
|
2019-11-11 08:03:16 +01:00
|
|
|
void processOutputLine(const QByteArray &outputLine) override;
|
|
|
|
|
void processStdError(const QByteArray &outputLine) override;
|
2018-12-07 10:00:23 +01:00
|
|
|
TestResultPtr createDefaultResult() const override;
|
|
|
|
|
|
|
|
|
|
private:
|
2022-06-20 11:45:36 +02:00
|
|
|
void onDone();
|
2018-12-07 10:00:23 +01:00
|
|
|
void sendCompleteInformation();
|
|
|
|
|
void handleMessageMatch(const QRegularExpressionMatch &match);
|
|
|
|
|
void reportNoOutputFinish(const QString &description, ResultType type);
|
2021-05-26 15:50:03 +02:00
|
|
|
Utils::FilePath m_projectFile;
|
2018-12-07 10:00:23 +01:00
|
|
|
QString m_currentModule;
|
|
|
|
|
QString m_currentSuite;
|
|
|
|
|
QString m_currentTest;
|
|
|
|
|
QString m_description;
|
2021-05-26 15:50:03 +02:00
|
|
|
Utils::FilePath m_fileName;
|
2018-12-07 10:00:23 +01:00
|
|
|
ResultType m_result = ResultType::Invalid;
|
|
|
|
|
int m_lineNumber = 0;
|
|
|
|
|
int m_testCaseCount = -1;
|
|
|
|
|
LogLevel m_logLevel;
|
|
|
|
|
ReportLevel m_reportLevel;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|