diff options
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/qmake/qmake.pro | 2 | ||||
-rw-r--r-- | tests/auto/tools/qmake/tst_qmake.cpp | 22 |
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() |