2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 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:
|
|
|
|
|
GTestOutputReader(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);
|
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;
|
2018-01-16 08:41:18 +01:00
|
|
|
TestResultPtr createDefaultResult() const override;
|
2016-05-11 13:02:42 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-05-24 07:17:50 +02:00
|
|
|
void setCurrentTestCase(const QString &testCase);
|
|
|
|
|
void setCurrentTestSuite(const QString &testSuite);
|
2020-03-20 11:48:37 +01:00
|
|
|
void handleDescriptionAndReportResult(TestResultPtr 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
|