diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-19 10:33:53 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-19 10:37:33 (GMT) |
commit | 723a56f418cc19845e1f6281ab19b8f58f44eed2 (patch) | |
tree | 5a84784ded5a2cafce39eb9703f400492a268390 /tests/auto/bic | |
parent | 1d453176fe4be7888df4362adc3e96acf0bd62c2 (diff) | |
download | Qt-723a56f418cc19845e1f6281ab19b8f58f44eed2.zip Qt-723a56f418cc19845e1f6281ab19b8f58f44eed2.tar.gz Qt-723a56f418cc19845e1f6281ab19b8f58f44eed2.tar.bz2 |
[tst_bic] Cache the compilation results for a faster testing
Diffstat (limited to 'tests/auto/bic')
-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 18dce58..cc4f658 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(); |