AutoTest: Move test framework related code...

...into files and respective sub folders.

Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-05-11 13:02:42 +02:00
parent 6c18ed50d2
commit 2f8b4b3fbf
52 changed files with 3643 additions and 2427 deletions

View File

@@ -29,12 +29,8 @@
#include <QFutureInterface>
#include <QObject>
#include <QProcess>
#include <QString>
#include <QXmlStreamReader>
QT_BEGIN_NAMESPACE
class QProcess;
QT_END_NAMESPACE
namespace Autotest {
namespace Internal {
@@ -54,55 +50,5 @@ protected:
QString m_buildDir;
};
class QtTestOutputReader : public TestOutputReader
{
public:
QtTestOutputReader(const QFutureInterface<TestResultPtr> &futureInterface,
QProcess *testApplication, const QString &buildDirectory);
protected:
void processOutput() override;
private:
enum CDATAMode
{
None,
DataTag,
Description,
QtVersion,
QtBuild,
QTestVersion
};
CDATAMode m_cdataMode = None;
QString m_className;
QString m_testCase;
QString m_dataTag;
Result::Type m_result = Result::Invalid;
QString m_description;
QString m_file;
int m_lineNumber = 0;
QString m_duration;
QXmlStreamReader m_xmlReader;
};
class GTestOutputReader : public TestOutputReader
{
public:
GTestOutputReader(const QFutureInterface<TestResultPtr> &futureInterface,
QProcess *testApplication, const QString &buildDirectory);
protected:
void processOutput() override;
private:
QString m_currentTestName;
QString m_currentTestSet;
QString m_description;
QByteArray m_unprocessed;
int m_iteration = 0;
};
} // namespace Internal
} // namespace Autotest