summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmake
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-27 04:58:37 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-27 04:58:37 (GMT)
commitfd5770529a6c712527d0d80cd394d6557e7e8cb9 (patch)
tree1f74ebf2dcf8e17adb2eca3bcaf4f96910e73795 /tests/auto/qmake
parentc43cf8ad4f1ba7d6d9e2403520a7e54ceadee60c (diff)
parent34a107454426db2f40b3be31923b8a5ce1d84f6e (diff)
downloadQt-fd5770529a6c712527d0d80cd394d6557e7e8cb9.zip
Qt-fd5770529a6c712527d0d80cd394d6557e7e8cb9.tar.gz
Qt-fd5770529a6c712527d0d80cd394d6557e7e8cb9.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests/auto/qmake')
-rw-r--r--tests/auto/qmake/qmake.pro1
-rw-r--r--tests/auto/qmake/testdata/substitutes/test.pro6
-rw-r--r--tests/auto/qmake/testdata/substitutes/test3.txt1
-rw-r--r--tests/auto/qmake/tst_qmake.cpp5
4 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/qmake/qmake.pro b/tests/auto/qmake/qmake.pro
index 8cae6be..d0faa87 100644
--- a/tests/auto/qmake/qmake.pro
+++ b/tests/auto/qmake/qmake.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
HEADERS += testcompiler.h
SOURCES += tst_qmake.cpp testcompiler.cpp
+QT -= gui
cross_compile: DEFINES += QMAKE_CROSS_COMPILED
diff --git a/tests/auto/qmake/testdata/substitutes/test.pro b/tests/auto/qmake/testdata/substitutes/test.pro
index ddad93f..26b0272 100644
--- a/tests/auto/qmake/testdata/substitutes/test.pro
+++ b/tests/auto/qmake/testdata/substitutes/test.pro
@@ -1 +1,5 @@
-QMAKE_SUBSTITUTES += test.in sub/test2.in
+QMAKE_SUBSTITUTES += test.in sub/test2.in indirect
+
+indirect.input = $$PWD/test3.txt
+indirect.output = $$OUT_PWD/sub/indirect_test.txt
+
diff --git a/tests/auto/qmake/testdata/substitutes/test3.txt b/tests/auto/qmake/testdata/substitutes/test3.txt
new file mode 100644
index 0000000..ce01362
--- /dev/null
+++ b/tests/auto/qmake/testdata/substitutes/test3.txt
@@ -0,0 +1 @@
+hello
diff --git a/tests/auto/qmake/tst_qmake.cpp b/tests/auto/qmake/tst_qmake.cpp
index 060fa01..1d3e128 100644
--- a/tests/auto/qmake/tst_qmake.cpp
+++ b/tests/auto/qmake/tst_qmake.cpp
@@ -99,7 +99,8 @@ private:
tst_qmake::tst_qmake()
{
- QString cmd = QString("qmake \"QT_VERSION=%1\"").arg(QT_VERSION);
+ QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+ QString cmd = QString("%2/qmake \"QT_VERSION=%1\"").arg(QT_VERSION).arg(binpath);
#ifdef Q_CC_MSVC
test_compiler.setBaseCommands( "nmake", cmd );
#elif defined(Q_CC_MINGW)
@@ -484,12 +485,14 @@ void tst_qmake::substitutes()
QVERIFY( test_compiler.qmake( workDir, "test" ));
QVERIFY( test_compiler.exists( workDir, "test", Plain, "" ));
QVERIFY( test_compiler.exists( workDir, "sub/test2", Plain, "" ));
+ QVERIFY( test_compiler.exists( workDir, "sub/indirect_test.txt", Plain, "" ));
QVERIFY( test_compiler.makeDistClean( workDir ));
QString buildDir = base_path + "/testdata/substitutes_build";
QVERIFY( test_compiler.qmake( workDir, "test", buildDir ));
QVERIFY( test_compiler.exists( buildDir, "test", Plain, "" ));
QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" ));
+ QVERIFY( test_compiler.exists( buildDir, "sub/indirect_test.txt", Plain, "" ));
QVERIFY( test_compiler.makeDistClean( buildDir ));
}