diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2010-05-22 07:54:33 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2010-06-02 23:09:23 (GMT) |
commit | d29e1dda8fbc24087b9cf0bf08d929bef74f5c96 (patch) | |
tree | 28bafc7d451ae679504f7818e5b0bc0ca6209525 /mkspecs/features/testcase.prf | |
parent | 55664a0ef4b88b67c9931c7d2f6853e5fa0a9716 (diff) | |
download | Qt-d29e1dda8fbc24087b9cf0bf08d929bef74f5c96.zip Qt-d29e1dda8fbc24087b9cf0bf08d929bef74f5c96.tar.gz Qt-d29e1dda8fbc24087b9cf0bf08d929bef74f5c96.tar.bz2 |
Move `check' target for autotests into testcase.prf
testcase.prf is installed, thus allowing `make check' to work
outside of the Qt source tree.
Diffstat (limited to 'mkspecs/features/testcase.prf')
-rw-r--r-- | mkspecs/features/testcase.prf | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf new file mode 100644 index 0000000..db4f673 --- /dev/null +++ b/mkspecs/features/testcase.prf @@ -0,0 +1,51 @@ +!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. +!isEmpty(DESTDIR):!contains(DESTDIR,^\./?): check.commands = cd $(DESTDIR) && +contains(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 + } + } +} + +} + |