From f99b2298d2b9c48d75b85d2907e3fe12dda9a31b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Jun 2012 21:42:55 +0200 Subject: make test suite properly shadow build compatible Change-Id: I42331f1894c6c09d098d84fc41f96c40f4725907 Reviewed-by: Rohan McGovern --- tests/auto/patternistexamples/patternistexamples.pro | 2 ++ .../patternistexamples/tst_patternistexamples.cpp | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'tests/auto/patternistexamples') diff --git a/tests/auto/patternistexamples/patternistexamples.pro b/tests/auto/patternistexamples/patternistexamples.pro index c36c120..97c792a 100644 --- a/tests/auto/patternistexamples/patternistexamples.pro +++ b/tests/auto/patternistexamples/patternistexamples.pro @@ -19,5 +19,7 @@ wince*: { DEPLOYMENT += snippets widgetRen globVar filetree recipes files # take care of dependency QT += network +} else { + DEFINES += SOURCETREE=\\\"$$absolute_path(../../..)/\\\" } include (../xmlpatterns.pri) diff --git a/tests/auto/patternistexamples/tst_patternistexamples.cpp b/tests/auto/patternistexamples/tst_patternistexamples.cpp index 3ae263b..8d0c46d 100644 --- a/tests/auto/patternistexamples/tst_patternistexamples.cpp +++ b/tests/auto/patternistexamples/tst_patternistexamples.cpp @@ -82,17 +82,17 @@ private: void tst_PatternistExamples::initTestCase() { #ifndef Q_OS_WINCE - m_dirs.append(QDir(QLatin1String("../../../doc/src/snippets/patternist/"))); - m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/xquery/globalVariables/"))); - m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/filetree/"))); - m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/recipes/"))); - m_dirs.append(QDir(QLatin1String("../../../examples/xmlpatterns/recipes/files/"))); + m_dirs.append(QDir(QLatin1String(SOURCETREE "doc/src/snippets/patternist/"))); + m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/xquery/globalVariables/"))); + m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/filetree/"))); + m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/recipes/"))); + m_dirs.append(QDir(QLatin1String(SOURCETREE "examples/xmlpatterns/recipes/files/"))); #else - m_dirs.append(QDir(QLatin1String("patternist/"))); - m_dirs.append(QDir(QLatin1String("globalVariables/"))); - m_dirs.append(QDir(QLatin1String("filetree/"))); - m_dirs.append(QDir(QLatin1String("recipes/"))); - m_dirs.append(QDir(QLatin1String("recipes/files/"))); + m_dirs.append(QDir(QFINDTESTDATA("patternist/"))); + m_dirs.append(QDir(QFINDTESTDATA("globalVariables/"))); + m_dirs.append(QDir(QFINDTESTDATA("filetree/"))); + m_dirs.append(QDir(QFINDTESTDATA("recipes/"))); + m_dirs.append(QDir(QFINDTESTDATA("recipes/files/"))); #endif for(int i = 0; i < m_dirs.size(); ++i) QVERIFY(m_dirs.at(i).exists()); -- cgit v1.2.1