diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-19 12:33:53 +0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-19 12:37:33 +0200 |
commit | 723a56f418cc19845e1f6281ab19b8f58f44eed2 (patch) | |
tree | 5a84784ded5a2cafce39eb9703f400492a268390 /tests/auto/bic/tst_bic.cpp | |
parent | 1d453176fe4be7888df4362adc3e96acf0bd62c2 (diff) | |
download | qt4-tools-723a56f418cc19845e1f6281ab19b8f58f44eed2.tar.gz |
[tst_bic] Cache the compilation results for a faster testing
Diffstat (limited to 'tests/auto/bic/tst_bic.cpp')
-rw-r--r-- | tests/auto/bic/tst_bic.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index 18dce58962..cc4f65866a 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -59,6 +59,8 @@ public: tst_Bic(); QBic::Info getCurrentInfo(const QString &libName); + QHash<QString, QBic::Info> cachedCurrentInfo; + private slots: void initTestCase_data(); void initTestCase(); @@ -154,7 +156,6 @@ void tst_Bic::initTestCase_data() QTest::newRow("QtWebKit") << "QtWebKit"; QTest::newRow("QtXml") << "QtXml"; QTest::newRow("QtXmlPatterns") << "QtXmlPatterns"; - } void tst_Bic::initTestCase() @@ -210,6 +211,10 @@ void tst_Bic::sizesAndVTables_data() QBic::Info tst_Bic::getCurrentInfo(const QString &libName) { + QBic::Info &inf = cachedCurrentInfo[libName]; + if (!inf.classSizes.isEmpty()) + return inf; + QTemporaryFile tmpQFile; tmpQFile.open(); QString tmpFileName = tmpQFile.fileName(); @@ -269,7 +274,7 @@ QBic::Info tst_Bic::getCurrentInfo(const QString &libName) } QString resultFileName = files.first(); - QBic::Info inf = bic.parseFile(resultFileName); + inf = bic.parseFile(resultFileName); QFile::remove(resultFileName); tmpQFile.close(); |