2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2018-12-07 10:00:23 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../testoutputreader.h"
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
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:
|
2023-05-03 16:00:22 +02:00
|
|
|
BoostTestOutputReader(Utils::Process *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;
|
2023-01-14 16:25:51 +01:00
|
|
|
TestResult createDefaultResult() const override;
|
2018-12-07 10:00:23 +01:00
|
|
|
|
|
|
|
|
private:
|
2023-01-16 22:10:10 +01:00
|
|
|
void onDone(int exitCode);
|
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
|