diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-25 08:32:56 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-25 08:32:56 (GMT) |
commit | f035995584ec384c03465fb3a7f73818eb8da652 (patch) | |
tree | b4eb903f7d391f9a1e4a5e5764b5a39a755c1a2a /tests/auto/bic | |
parent | 25c5de7f168652ff5c3e6e49d09567d3ef4b41fd (diff) | |
download | Qt-f035995584ec384c03465fb3a7f73818eb8da652.zip Qt-f035995584ec384c03465fb3a7f73818eb8da652.tar.gz Qt-f035995584ec384c03465fb3a7f73818eb8da652.tar.bz2 |
Update the test to work with GCC 4.4 too
Diffstat (limited to 'tests/auto/bic')
-rw-r--r-- | tests/auto/bic/tst_bic.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index 36c35ff..b5b503d 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -261,22 +261,18 @@ QBic::Info tst_Bic::getCurrentInfo(const QString &libName) return QBic::Info(); } - QString resultFileName = QFileInfo(tmpQFile).fileName(); - static const char *suffixes[] = { ".t01.class", ".class", ".002t.class", 0 }; - for (const char **p = suffixes; true; ++p) { - if (!p) { - // we didn't find the file - qFatal("GCC didn't produce the expected intermediary files. Please update this test!"); - return QBic::Info(); - } - - QString check = resultFileName + *p; - if (!QFile::exists(check)) - continue; - - resultFileName = check; - break; + // 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); |