summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-04 06:35:37 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-04 06:35:37 (GMT)
commit02fd8c18e41eeb1259cded3866545515b919e974 (patch)
treef7451453c15426ae98a6c2890f31198f2263fa47 /mkspecs/features
parent1448e19b3613ab7c5498c17c619586d03ec46d18 (diff)
parent21bd54d5cf754ca5a5928cbd3c2a0ab17e64f633 (diff)
downloadQt-02fd8c18e41eeb1259cded3866545515b919e974.zip
Qt-02fd8c18e41eeb1259cded3866545515b919e974.tar.gz
Qt-02fd8c18e41eeb1259cded3866545515b919e974.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: Skip tst_maketestselftest::make_check by default on Windows Fixed tst_maketestselftest on QWS and Windows. Add a test for the `make check' feature. Fix `make check' for debug-and-release on Windows. Move `check' target for autotests into testcase.prf
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/qttest_p4.prf36
-rw-r--r--mkspecs/features/testcase.prf65
2 files changed, 66 insertions, 35 deletions
diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf
index d2011d0..d1c7c2b 100644
--- a/mkspecs/features/qttest_p4.prf
+++ b/mkspecs/features/qttest_p4.prf
@@ -1,5 +1,5 @@
isEmpty(TEMPLATE):TEMPLATE=app
-CONFIG += qt warn_on console depend_includepath
+CONFIG += qt warn_on console depend_includepath testcase
qtAddLibrary(QtTest)
@@ -13,39 +13,5 @@ symbian:{
# prefix test binary with tst_
!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
-
-check.files =
-check.path = .
-!isEmpty(DESTDIR): check.commands = cd ./$(DESTDIR) &&
-macx: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
-else:unix: check.commands += ./$(QMAKE_TARGET)
-else:win32: {
- CONFIG(debug, debug|release):check.commands += $(DESTDIR_TARGET)
- else:check.commands += $(DESTDIR_TARGET)
-}
-embedded: check.commands += -qws
-QMAKE_EXTRA_TARGETS += check
-
-!debug_and_release|build_pass {
- check.depends = first
-} else {
- check.CONFIG = recursive
- # In debug and release mode, only run the test once.
- # Run debug if available, release otherwise.
- debug_and_release {
- check.target = dummy_check
- check.recurse_target = check
- debug {
- real_check.depends = debug-check
- real_check.target = check
- QMAKE_EXTRA_TARGETS += real_check
- } else {
- real_check.depends = release-check
- real_check.target = check
- QMAKE_EXTRA_TARGETS += real_check
- }
- }
-}
-
target.path += $$[QT_INSTALL_PREFIX]/tests/qt4
INSTALLS += target
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
new file mode 100644
index 0000000..2a56d7d
--- /dev/null
+++ b/mkspecs/features/testcase.prf
@@ -0,0 +1,65 @@
+!contains(TEMPLATE,subdirs) {
+
+check.files =
+check.path = .
+
+# If the test ends up in a different directory, we should cd to that directory.
+# Note that qmake modifies DESTDIR after this file is processed,
+# therefore, testing DESTDIR for emptiness is not sufficient.
+# Also note that in debug-and-release mode we don't want to cd into the debug/release
+# directory (e.g. if the test goes to foo/release/tst_thing.exe, we want to do
+# cd foo && release/tst_thing.exe ).
+MUNGED_DESTDIR=$$DESTDIR
+MUNGED_TARGET=$$TARGET
+win32:debug_and_release {
+ contains(DESTDIR,^release$)|contains(DESTDIR,^debug$):MUNGED_DESTDIR=
+
+ # In debug-and-release mode, the first ../ in TARGET breaks out of the debug/release
+ # subdirectory. However, since make's working directory is already outside of the
+ # debug/release subdirectory, this first ../ should be ignored when deciding if
+ # we have to change directory before running the test.
+ MUNGED_TARGET=$$replace(MUNGED_TARGET,^\.\./,)
+}
+!isEmpty(MUNGED_DESTDIR):!contains(MUNGED_DESTDIR,^\./?):check.commands = cd $(DESTDIR) &&
+contains(MUNGED_TARGET,.*/.*):check.commands = cd $(DESTDIR) &&
+
+# Allow for a custom test runner script
+check.commands += $(TESTRUNNER)
+
+macx {
+ app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
+ else: check.commands += ./$(QMAKE_TARGET)
+}
+else:unix: check.commands += ./$(QMAKE_TARGET)
+else: check.commands += $(DESTDIR_TARGET)
+
+# For Qt/Embedded, run every test app as a QWS server
+embedded: check.commands += -qws
+
+# Allow for custom arguments to tests
+check.commands += $(TESTARGS)
+QMAKE_EXTRA_TARGETS *= check
+
+!debug_and_release|build_pass {
+ check.depends = first
+} else {
+ check.CONFIG = recursive
+ # In debug and release mode, only run the test once.
+ # Run debug if available, release otherwise.
+ debug_and_release {
+ check.target = dummy_check
+ check.recurse_target = check
+ debug {
+ real_check.depends = debug-check
+ real_check.target = check
+ QMAKE_EXTRA_TARGETS += real_check
+ } else {
+ real_check.depends = release-check
+ real_check.target = check
+ QMAKE_EXTRA_TARGETS += real_check
+ }
+ }
+}
+
+}
+