summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2011-12-15 09:34:50 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-15 05:48:27 +0100
commitd936fe085894f58451a6f36c46377ac507f09170 (patch)
tree4b447a2543ced8b0adc0c43bb0fd2bce43022ccb /tests/auto/tools
parent2163f05942a9e13264fcfc52666c451e9c77f5f0 (diff)
Fix qimagereader, qmovie and qmake unittest to work in shadow build.
Changed to use QFINDTESTDATA and TESTDATA. Change-Id: I8684bc191cf8ffb8b531456e32047d582ebc018c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/qmake/qmake.pro2
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp22
2 files changed, 13 insertions, 11 deletions
diff --git a/tests/auto/tools/qmake/qmake.pro b/tests/auto/tools/qmake/qmake.pro
index d535c9c0b8..1d9c5bec6e 100644
--- a/tests/auto/tools/qmake/qmake.pro
+++ b/tests/auto/tools/qmake/qmake.pro
@@ -5,3 +5,5 @@ SOURCES += tst_qmake.cpp testcompiler.cpp
QT = core testlib
cross_compile: DEFINES += QMAKE_CROSS_COMPILED
+
+TESTDATA += testdata/*
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index 8de822b47a..dbb845ba81 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -98,6 +98,15 @@ private:
tst_qmake::tst_qmake()
{
+}
+
+tst_qmake::~tst_qmake()
+{
+
+}
+
+void tst_qmake::initTestCase()
+{
QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
QString cmd = QString("%2/qmake \"QT_VERSION=%1\"").arg(QT_VERSION).arg(binpath);
#ifdef Q_CC_MSVC
@@ -109,17 +118,8 @@ tst_qmake::tst_qmake()
#else
test_compiler.setBaseCommands( "make", cmd );
#endif
- QDir dir;
- base_path = dir.currentPath();
-}
-
-tst_qmake::~tst_qmake()
-{
-
-}
-
-void tst_qmake::initTestCase()
-{
+ QString tmpFile = QFINDTESTDATA("testdata");
+ base_path = tmpFile.left(tmpFile.lastIndexOf('/'));
}
void tst_qmake::cleanupTestCase()