QXmlStream: run the test suite from a method other than initTestCase()
Only unzip the test suite in initTestCase(), but run the tests from runTestSuite(). This is mainly useful when running specific a unittest locally, no need to wait for the whole zipped test suite to run. Change-Id: I518a2de716d3d07fb5a78298f1bd3ab2759e744b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
d1140235e2
commit
3202ab1eb1
@ -542,6 +542,7 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
void cleanupTestCase();
|
void cleanupTestCase();
|
||||||
|
void runTestSuite();
|
||||||
void reportFailures() const;
|
void reportFailures() const;
|
||||||
void reportFailures_data();
|
void reportFailures_data();
|
||||||
void checkBaseline() const;
|
void checkBaseline() const;
|
||||||
@ -624,7 +625,14 @@ void tst_QXmlStream::initTestCase()
|
|||||||
QFile::remove(destinationPath); // copy will fail if file exists
|
QFile::remove(destinationPath); // copy will fail if file exists
|
||||||
QVERIFY(QFile::copy(fileInfo.filePath(), destinationPath));
|
QVERIFY(QFile::copy(fileInfo.filePath(), destinationPath));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void tst_QXmlStream::cleanupTestCase()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void tst_QXmlStream::runTestSuite()
|
||||||
|
{
|
||||||
QFile file(m_tempDir.filePath(catalogFile));
|
QFile file(m_tempDir.filePath(catalogFile));
|
||||||
QVERIFY2(file.open(QIODevice::ReadOnly),
|
QVERIFY2(file.open(QIODevice::ReadOnly),
|
||||||
qPrintable(QString::fromLatin1("Failed to open the test suite catalog; %1").arg(file.fileName())));
|
qPrintable(QString::fromLatin1("Failed to open the test suite catalog; %1").arg(file.fileName())));
|
||||||
@ -632,10 +640,6 @@ void tst_QXmlStream::initTestCase()
|
|||||||
QVERIFY(m_handler.runTests(&file));
|
QVERIFY(m_handler.runTests(&file));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QXmlStream::cleanupTestCase()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QXmlStream::reportFailures() const
|
void tst_QXmlStream::reportFailures() const
|
||||||
{
|
{
|
||||||
QFETCH(bool, isError);
|
QFETCH(bool, isError);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user