summaryrefslogtreecommitdiffstats
path: root/tests/auto/qxmlstream
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-01-06 15:13:16 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-01-06 15:25:58 (GMT)
commitf8780558e3fc68321a0dd6dcef611eeee0805a2e (patch)
tree4e31c8403b4d55f38a90ecb126df0be03973f070 /tests/auto/qxmlstream
parent0fb15111a04c5a70ebc8e1f0c7e15508291b2818 (diff)
downloadQt-f8780558e3fc68321a0dd6dcef611eeee0805a2e.zip
Qt-f8780558e3fc68321a0dd6dcef611eeee0805a2e.tar.gz
Qt-f8780558e3fc68321a0dd6dcef611eeee0805a2e.tar.bz2
Fixed qxmlstream autotest when using shadow builds.
Reviewed-by: trustme
Diffstat (limited to 'tests/auto/qxmlstream')
-rw-r--r--tests/auto/qxmlstream/qxmlstream.pro4
-rw-r--r--tests/auto/qxmlstream/tst_qxmlstream.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qxmlstream/qxmlstream.pro b/tests/auto/qxmlstream/qxmlstream.pro
index ac03d42..89d7bc1 100644
--- a/tests/auto/qxmlstream/qxmlstream.pro
+++ b/tests/auto/qxmlstream/qxmlstream.pro
@@ -8,4 +8,8 @@ wince*|symbian*: {
addFiles.sources = data XML-Test-Suite
addFiles.path = .
DEPLOYMENT += addFiles
+ DEFINES += SRCDIR=\\\"\\\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+
diff --git a/tests/auto/qxmlstream/tst_qxmlstream.cpp b/tests/auto/qxmlstream/tst_qxmlstream.cpp
index e5ba190..62cb54d 100644
--- a/tests/auto/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/qxmlstream/tst_qxmlstream.cpp
@@ -57,7 +57,7 @@
Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour)
-static const char *const catalogFile = "XML-Test-Suite/xmlconf/finalCatalog.xml";
+static const char *const catalogFile = SRCDIR "XML-Test-Suite/xmlconf/finalCatalog.xml";
static const int expectedRunCount = 1646;
static const int expectedSkipCount = 532;
@@ -803,7 +803,7 @@ void tst_QXmlStream::testReader_data() const
QTest::addColumn<QString>("xml");
QTest::addColumn<QString>("ref");
QDir dir;
- dir.cd("data/");
+ dir.cd(SRCDIR "data/");
foreach(QString filename , dir.entryList(QStringList() << "*.xml")) {
QString reference = QFileInfo(filename).baseName() + ".ref";
QTest::newRow(dir.filePath(filename).toLatin1().data()) << dir.filePath(filename) << dir.filePath(reference);
@@ -1182,7 +1182,7 @@ void tst_QXmlStream::crashInUTF16Codec() const
QEventLoop eventLoop;
QNetworkAccessManager networkManager;
- QNetworkRequest request(QUrl::fromLocalFile(QLatin1String("data/051reduced.xml")));
+ QNetworkRequest request(QUrl::fromLocalFile(QLatin1String(SRCDIR "data/051reduced.xml")));
QNetworkReply *const reply = networkManager.get(request);
eventLoop.connect(reply, SIGNAL(finished()), SLOT(quit()));