2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 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
|
2016-05-11 13:02:42 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../testoutputreader.h"
|
|
|
|
|
|
|
|
|
|
namespace Autotest {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class GTestOutputReader : public TestOutputReader
|
|
|
|
|
{
|
|
|
|
|
public:
|
2023-05-03 16:00:22 +02:00
|
|
|
GTestOutputReader(Utils::Process *testApplication, const Utils::FilePath &buildDirectory,
|
2021-05-26 15:50:03 +02:00
|
|
|
const Utils::FilePath &projectFile);
|
2016-05-11 13:02:42 +02:00
|
|
|
protected:
|
2019-11-11 08:03:16 +01:00
|
|
|
void processOutputLine(const QByteArray &outputLine) override;
|
2019-12-11 11:29:15 +01:00
|
|
|
void processStdError(const QByteArray &outputLine) override;
|
2023-01-14 16:25:51 +01:00
|
|
|
TestResult createDefaultResult() const override;
|
2016-05-11 13:02:42 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-06-20 13:54:30 +02:00
|
|
|
void onDone(int exitCode) override;
|
2019-05-24 07:17:50 +02:00
|
|
|
void setCurrentTestCase(const QString &testCase);
|
|
|
|
|
void setCurrentTestSuite(const QString &testSuite);
|
2023-01-14 16:25:51 +01:00
|
|
|
void handleDescriptionAndReportResult(const TestResult &testResult);
|
2017-08-04 18:33:50 +02:00
|
|
|
|
2021-05-26 15:50:03 +02:00
|
|
|
Utils::FilePath m_projectFile;
|
2019-05-24 07:17:50 +02:00
|
|
|
QString m_currentTestSuite;
|
|
|
|
|
QString m_currentTestCase;
|
2016-05-11 13:02:42 +02:00
|
|
|
QString m_description;
|
2016-12-14 13:30:33 +01:00
|
|
|
int m_iteration = 1;
|
2020-03-20 11:48:37 +01:00
|
|
|
bool m_testSetStarted = false;
|
2016-05-11 13:02:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Autotest
|