summaryrefslogtreecommitdiffstats
path: root/config
ModeNameSize
-rw-r--r--BlankForm5150logstatsplain
-rwxr-xr-xCOPYING767logstatsplain
-rwxr-xr-xMakefile.am.blank2607logstatsplain
-rw-r--r--apple1699logstatsplain
-rw-r--r--commence.am4143logstatsplain
-rw-r--r--conclude.am10741logstatsplain
-rw-r--r--craynv6726logstatsplain
-rw-r--r--dec-flags3824logstatsplain
-rw-r--r--examples.am4431logstatsplain
-rw-r--r--freebsd2429logstatsplain
-rw-r--r--gnu-fflags3381logstatsplain
-rw-r--r--gnu-flags23728logstatsplain
-rw-r--r--hpux11.232353logstatsplain
-rw-r--r--i386-pc-cygwin321110logstatsplain
-rw-r--r--i686-pc-cygwin3135logstatsplain
-rw-r--r--ia64-linux-gnu4174logstatsplain
-rw-r--r--ibm-aix6299logstatsplain
-rw-r--r--intel-fflags3058logstatsplain
-rw-r--r--intel-flags3768logstatsplain
-rw-r--r--irix6.x7600logstatsplain
-rw-r--r--linux-gnu805logstatsplain
-rw-r--r--linux-gnuaout805logstatsplain
-rw-r--r--linux-gnulibc13862logstatsplain
-rw-r--r--linux-gnulibc21017logstatsplain
-rw-r--r--lt_vers.am2618logstatsplain
-rw-r--r--mpich3025logstatsplain
-rw-r--r--nec-superux14.15957logstatsplain
-rw-r--r--pgi-fflags3647logstatsplain
-rw-r--r--pgi-flags3378logstatsplain
-rw-r--r--powerpc-ibm-aix5.x6241logstatsplain
d---------site-specific37logstatsplain
-rw-r--r--solaris2.x3192logstatsplain
-rw-r--r--sv1-cray6410logstatsplain
-rw-r--r--x86_64-redstorm-linux-gnu7817logstatsplain
class="hl opt">)); bic.addBlacklistedClass(QLatin1String("QAtomic")); bic.addBlacklistedClass(QLatin1String("QBasicAtomic")); /* Jambi-related classes in Designer */ bic.addBlacklistedClass(QLatin1String("QDesignerLanguageExtension")); /* Harald says it's undocumented and private :) */ bic.addBlacklistedClass(QLatin1String("QAccessibleInterfaceEx")); bic.addBlacklistedClass(QLatin1String("QAccessibleObjectEx")); bic.addBlacklistedClass(QLatin1String("QAccessibleWidgetEx")); /* This structure is semi-private and should never shrink */ bic.addBlacklistedClass(QLatin1String("QVFbHeader")); } void tst_Bic::initTestCase_data() { QTest::addColumn<QString>("libName"); QTest::newRow("QtCore") << "QtCore"; QTest::newRow("QtGui") << "QtGui"; QTest::newRow("QtScript") << "QtScript"; QTest::newRow("QtSql") << "QtSql"; QTest::newRow("QtSvg") << "QtSvg"; QTest::newRow("QtNetwork") << "QtNetwork"; QTest::newRow("QtOpenGL") << "QtOpenGL"; QTest::newRow("QtXml") << "QtXml"; QTest::newRow("QtXmlPatterns") << "QtXmlPatterns"; QTest::newRow("Qt3Support") << "Qt3Support"; QTest::newRow("QtTest") << "QtTest"; QTest::newRow("QtDBus") << "QtDBus"; QTest::newRow("QtDesigner") << "QtDesigner"; } void tst_Bic::initTestCase() { QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR")); QVERIFY2(!qtDir.isEmpty(), "This test needs $QTDIR"); if (qgetenv("PATH").contains("teambuilder")) QTest::qWarn("This test might not work with teambuilder, consider switching it off."); } void tst_Bic::sizesAndVTables_data() { #if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) 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"; # elif defined(__amd64__) archFileName400 = SRCDIR "data/%1.4.0.0.linux-gcc-amd64.txt"; # 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"; # 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"; #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"; #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"; #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; #endif } QBic::Info tst_Bic::getCurrentInfo(const QString &libName) { QTemporaryFile tmpQFile; tmpQFile.open(); QString tmpFileName = tmpQFile.fileName(); QByteArray tmpFileContents = "#include<" + libName.toLatin1() + "/" + libName.toLatin1() + ">\n"; tmpQFile.write(tmpFileContents); tmpQFile.flush(); QString qtDir = QString::fromLocal8Bit(qgetenv("QTDIR")); #ifdef Q_OS_WIN qtDir.replace('\\', '/'); #endif QString compilerName = "g++"; QStringList args; args << "-c" << "-I" + qtDir + "/include" #ifndef Q_OS_WIN << "-I/usr/X11R6/include/" #endif << "-DQT_NO_STL" << "-DQT3_SUPPORT" << "-xc++" #if !defined(Q_OS_AIX) && !defined(Q_OS_WIN) << "-o" << "/dev/null" #endif << "-fdump-class-hierarchy" << tmpFileName; QProcess proc; proc.start(compilerName, args, QIODevice::ReadOnly); if (!proc.waitForFinished(6000000)) { qWarning() << "gcc didn't finish" << proc.errorString(); return QBic::Info(); } if (proc.exitCode() != 0) { qWarning() << "gcc returned with" << proc.exitCode(); return QBic::Info(); } QString errs = QString::fromLocal8Bit(proc.readAllStandardError().constData()); if (!errs.isEmpty()) { qDebug() << "Arguments:" << args << "Warnings:" << errs; return QBic::Info(); } // See if we find the gcc output file, which seems to change // from release to release QStringList files = QDir().entryList(QStringList() << "*.class"); if (files.isEmpty()) { qFatal("Could not locate the GCC output file, update this test"); return QBic::Info(); } else if (files.size() > 1) { qFatal("Located more than one output file, please clean up before running this test"); return QBic::Info(); } QString resultFileName = files.first(); QBic::Info inf = bic.parseFile(resultFileName); QFile::remove(resultFileName); tmpQFile.close(); return inf; } void tst_Bic::sizesAndVTables() { #if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) QSKIP("Test not implemented for this compiler/platform", SkipAll); #else QFETCH_GLOBAL(QString, libName); QFETCH(QString, oldLib); QFETCH(bool, isPatchRelease); bool isFailed = false; qDebug() << oldLib.arg(libName); if (oldLib.isEmpty() || !QFile::exists(oldLib.arg(libName))) QSKIP("No platform spec found for this platform/version.", SkipSingle); const QBic::Info oldLibInfo = bic.parseFile(oldLib.arg(libName)); QVERIFY(!oldLibInfo.classVTables.isEmpty()); const QBic::Info currentLibInfo = getCurrentInfo(libName); QVERIFY(!currentLibInfo.classVTables.isEmpty()); QBic::VTableDiff diff = bic.diffVTables(oldLibInfo, currentLibInfo); if (!diff.removedVTables.isEmpty()) { qWarning() << "VTables for the following classes were removed" << diff.removedVTables; isFailed = true; } if (!diff.modifiedVTables.isEmpty()) { foreach(QStringPair entry, diff.modifiedVTables) qWarning() << "modified VTable:\n Old: " << entry.first << "\n New: " << entry.second; isFailed = true; } if (isPatchRelease && !diff.addedVTables.isEmpty()) { qWarning() << "VTables for the following classes were added in a patch release:" << diff.addedVTables; isFailed = true; } if (isPatchRelease && !diff.reimpMethods.isEmpty()) { foreach(QStringPair entry, diff.reimpMethods) qWarning() << "reimplemented virtual in patch release:\n Old: " << entry.first << "\n New: " << entry.second; isFailed = true; } QBic::SizeDiff sizeDiff = bic.diffSizes(oldLibInfo, currentLibInfo); if (!sizeDiff.mismatch.isEmpty()) { foreach (QString className, sizeDiff.mismatch) qWarning() << "size mismatch for" << className << "old" << oldLibInfo.classSizes.value(className) << "new" << currentLibInfo.classSizes.value(className); isFailed = true; } #ifdef Q_CC_MINGW /** * These symbols are from Windows' imm.h header, and is available * conditionally depending on the value of the WINVER define. We pull * them out since they're not relevant to the testing done. */ sizeDiff.removed.removeAll(QLatin1String("tagIMECHARPOSITION")); sizeDiff.removed.removeAll(QLatin1String("tagRECONVERTSTRING")); #endif if (!sizeDiff.removed.isEmpty()) { qWarning() << "the following classes were removed:" << sizeDiff.removed; isFailed = true; } if (isPatchRelease && !sizeDiff.added.isEmpty()) { qWarning() << "the following classes were added in a patch release:" << sizeDiff.added; isFailed = true; } if (isFailed) QFAIL("Test failed, read warnings above."); #endif } QTEST_APPLESS_MAIN(tst_Bic) #include "tst_bic.moc" #endif