summaryrefslogtreecommitdiffstats
path: root/tests/auto/bic/tst_bic.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-21 09:06:49 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-21 09:06:49 +0200
commit57e2e511ea3d67519a991fbd8fc814a606e50136 (patch)
treeb596e4ef33cc9d59ce9ef476dbfb24bded68769e /tests/auto/bic/tst_bic.cpp
parentdb9a3bedc9a3c99db83fb8d45255e36e57b8d0ec (diff)
parent741d0d3b87ff44207f29c0e8a9cfd83b1efe5ea7 (diff)
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (24 commits) Fix accidental change in QtWebKit QNAM HTTP: Pipelining improvement fix qmake conditionals QtScript: Add translation context test Ensure we stop the name lookups in QAbstractSocket if we abort(). Don't rely on tryStart() to do job control. [tst_bic] Suppress the warning about the QGraphicsProxyWidget BIC [tst_bic] Add two more private classes to the blacklist [tst_bic] Remove superfluous newline [tst_bic] Fix gen.sh not to generate sequential empty lines Fix QSslSocket::constructing autotest failure Improve QScript{Engine,Value}::toObject() test coverage [tst_bic] Add testing for Phonon too [tst_bic] Cache the compilation results for a faster testing [tst_bic] Blacklist all template expansions [tst_bic] Add baseline for Qt 4.6.0 [tst_bic] Collapse multiple empty newlines. [tst_bic] Remove the QtNetwork classes from the QtXmlPatterns description file [tst_bic] Add the exception for the BIC breakage in QGraphicsProxyWidget in 4.5 [tst_bic] Update the test to find newer versions of Qt after 4.3 ...
Diffstat (limited to 'tests/auto/bic/tst_bic.cpp')
-rw-r--r--tests/auto/bic/tst_bic.cpp96
1 files changed, 49 insertions, 47 deletions
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp
index 0331c96d0b..c4a84291c8 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();
@@ -119,6 +121,9 @@ tst_Bic::tst_Bic()
bic.addBlacklistedClass(QLatin1String("QAtomic"));
bic.addBlacklistedClass(QLatin1String("QBasicAtomic"));
bic.addBlacklistedClass(QLatin1String("QRegion::QRegionData"));
+ bic.addBlacklistedClass(QLatin1String("QtConcurrent::ThreadEngineSemaphore"));
+ bic.addBlacklistedClass(QLatin1String("QDrawPixmaps::Data"));
+ bic.addBlacklistedClass(QLatin1String("QS60Style"));
/* Jambi-related classes in Designer */
bic.addBlacklistedClass(QLatin1String("QDesignerLanguageExtension"));
@@ -138,17 +143,22 @@ void tst_Bic::initTestCase_data()
QTest::newRow("QtCore") << "QtCore";
QTest::newRow("QtGui") << "QtGui";
+
+ QTest::newRow("Qt3Support") << "Qt3Support";
+ QTest::newRow("QtDBus") << "QtDBus";
+ QTest::newRow("QtDesigner") << "QtDesigner";
+ QTest::newRow("QtMultimedia") << "QtMultimedia";
+ QTest::newRow("QtNetwork") << "QtNetwork";
+ QTest::newRow("QtOpenGL") << "QtOpenGL";
QTest::newRow("QtScript") << "QtScript";
+ QTest::newRow("QtScriptTools") << "QtScriptTools";
QTest::newRow("QtSql") << "QtSql";
QTest::newRow("QtSvg") << "QtSvg";
- QTest::newRow("QtNetwork") << "QtNetwork";
- QTest::newRow("QtOpenGL") << "QtOpenGL";
+ QTest::newRow("QtTest") << "QtTest";
+ QTest::newRow("QtWebKit") << "QtWebKit";
QTest::newRow("QtXml") << "QtXml";
QTest::newRow("QtXmlPatterns") << "QtXmlPatterns";
- QTest::newRow("Qt3Support") << "Qt3Support";
- QTest::newRow("QtTest") << "QtTest";
- QTest::newRow("QtDBus") << "QtDBus";
- QTest::newRow("QtDesigner") << "QtDesigner";
+ QTest::newRow("phonon") << "phonon";
}
void tst_Bic::initTestCase()
@@ -166,60 +176,48 @@ void tst_Bic::sizesAndVTables_data()
QSKIP("Test not implemented for this compiler/platform", SkipAll);
#else
- QString archFileName400;
- QString archFileName410;
- QString archFileName420;
- QString archFileName430;
-
#if defined Q_OS_LINUX && defined Q_WS_X11
# if defined(__powerpc__) && !defined(__powerpc64__)
- archFileName400 = SRCDIR "data/%1.4.0.0.linux-gcc-ppc32.txt";
- archFileName410 = SRCDIR "data/%1.4.1.0.linux-gcc-ppc32.txt";
- archFileName420 = SRCDIR "data/%1.4.2.0.linux-gcc-ppc32.txt";
+# define FILESUFFIX "linux-gcc-ppc32"
# elif defined(__amd64__)
- archFileName400 = SRCDIR "data/%1.4.0.0.linux-gcc-amd64.txt";
+# define FILESUFFIX "linux-gcc-amd64"
# elif defined(__i386__)
- archFileName400 = SRCDIR "data/%1.4.0.0.linux-gcc-ia32.txt";
- archFileName410 = SRCDIR "data/%1.4.1.0.linux-gcc-ia32.txt";
- archFileName420 = SRCDIR "data/%1.4.2.0.linux-gcc-ia32.txt";
- archFileName430 = SRCDIR "data/%1.4.3.0.linux-gcc-ia32.txt";
+# define FILESUFFIX "linux-gcc-ia32"
# endif
-#elif defined Q_OS_AIX
- if (sizeof(void*) == 4)
- archFileName400 = SRCDIR "data/%1.4.0.0.aix-gcc-power32.txt";
#elif defined Q_OS_MAC && defined(__powerpc__)
- archFileName400 = SRCDIR "data/%1.4.0.0.macx-gcc-ppc32.txt";
- archFileName410 = SRCDIR "data/%1.4.1.0.macx-gcc-ppc32.txt";
- archFileName420 = SRCDIR "data/%1.4.2.0.macx-gcc-ppc32.txt";
+# define FILESUFFIX "macx-gcc-ppc32"
#elif defined Q_OS_MAC && defined(__i386__)
- archFileName410 = SRCDIR "data/%1.4.1.0.macx-gcc-ia32.txt";
- archFileName420 = SRCDIR "data/%1.4.2.0.macx-gcc-ia32.txt";
+# define FILESUFFIX "macx-gcc-ia32"
+#elif defined Q_OS_MAC && defined(__amd64__)
+# define FILESUFFIX "macx-gcc-amd64";
#elif defined Q_OS_WIN && defined Q_CC_GNU
- archFileName410 = SRCDIR "data/%1.4.1.0.win32-gcc-ia32.txt";
- archFileName420 = SRCDIR "data/%1.4.2.0.win32-gcc-ia32.txt";
+# define FILESUFFIX "win32-gcc-ia32"
+#else
+ QSKIP("No reference files found for this platform", SkipAll);
#endif
- if (archFileName400.isEmpty() && archFileName410.isEmpty()
- && archFileName420.isEmpty())
- QSKIP("No reference files found for this platform", SkipAll);
-
- bool isPatchRelease400 = false;
- bool isPatchRelease410 = false;
- bool isPatchRelease420 = false;
- bool isPatchRelease430 = false;
-
QTest::addColumn<QString>("oldLib");
QTest::addColumn<bool>("isPatchRelease");
- QTest::newRow("4.0") << archFileName400 << isPatchRelease400;
- QTest::newRow("4.1") << archFileName410 << isPatchRelease410;
- QTest::newRow("4.2") << archFileName420 << isPatchRelease420;
- QTest::newRow("4.3") << archFileName430 << isPatchRelease430;
+ int minor = (QT_VERSION >> 8) & 0xFF;
+ int patch = QT_VERSION & 0xFF;
+ for (int i = 0; i <= minor; ++i) {
+ if (i != minor || patch)
+ QTest::newRow("4." + QByteArray::number(i))
+ << (QString(SRCDIR "data/%1.4.")
+ + QString::number(i)
+ + QString(".0." FILESUFFIX ".txt"))
+ << (i == minor && patch);
+ }
#endif
}
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();
@@ -279,7 +277,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();
@@ -317,10 +315,14 @@ void tst_Bic::sizesAndVTables()
}
if (!diff.modifiedVTables.isEmpty()) {
- foreach(QStringPair entry, diff.modifiedVTables)
- qWarning() << "modified VTable:\n Old: " << entry.first
- << "\n New: " << entry.second;
- isFailed = true;
+ if (diff.modifiedVTables.size() != 1 ||
+ strcmp(QTest::currentDataTag(), "4.4") != 0 ||
+ diff.modifiedVTables.at(0).first != "QGraphicsProxyWidget") {
+ foreach(QStringPair entry, diff.modifiedVTables)
+ qWarning() << "modified VTable:\n Old: " << entry.first
+ << "\n New: " << entry.second;
+ isFailed = true;
+ }
}
if (isPatchRelease && !diff.addedVTables.isEmpty()) {