source: trunk/mkspecs/features/testcase.prf@ 1036

Last change on this file since 1036 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 2.3 KB
Line 
1!contains(TEMPLATE,subdirs) {
2
3check.files =
4check.path = .
5
6# If the test ends up in a different directory, we should cd to that directory.
7# Note that qmake modifies DESTDIR after this file is processed,
8# therefore, testing DESTDIR for emptiness is not sufficient.
9# Also note that in debug-and-release mode we don't want to cd into the debug/release
10# directory (e.g. if the test goes to foo/release/tst_thing.exe, we want to do
11# cd foo && release/tst_thing.exe ).
12MUNGED_DESTDIR=$$DESTDIR
13MUNGED_TARGET=$$TARGET
14win32:debug_and_release {
15 contains(DESTDIR,^release$)|contains(DESTDIR,^debug$):MUNGED_DESTDIR=
16
17 # In debug-and-release mode, the first ../ in TARGET breaks out of the debug/release
18 # subdirectory. However, since make's working directory is already outside of the
19 # debug/release subdirectory, this first ../ should be ignored when deciding if
20 # we have to change directory before running the test.
21 MUNGED_TARGET=$$replace(MUNGED_TARGET,^\\.\\./,)
22}
23!isEmpty(MUNGED_DESTDIR):!contains(MUNGED_DESTDIR,^\\./?):check.commands = cd $(DESTDIR) &&
24contains(MUNGED_TARGET,.*/.*):check.commands = cd $(DESTDIR) &&
25
26# Allow for a custom test runner script
27check.commands += $(TESTRUNNER)
28
29macx {
30 app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
31 else: check.commands += ./$(QMAKE_TARGET)
32}
33else:unix: check.commands += ./$(QMAKE_TARGET)
34else: check.commands += $(DESTDIR_TARGET)
35
36# For Qt/Embedded, run every test app as a QWS server
37embedded: check.commands += -qws
38
39# Allow for custom arguments to tests
40check.commands += $(TESTARGS)
41QMAKE_EXTRA_TARGETS *= check
42
43!debug_and_release|build_pass {
44 check.depends = first
45} else {
46 check.CONFIG = recursive
47 # In debug and release mode, only run the test once.
48 # Run debug if available, release otherwise.
49 debug_and_release {
50 check.target = dummy_check
51 check.recurse_target = check
52 debug {
53 real_check.depends = debug-check
54 real_check.target = check
55 QMAKE_EXTRA_TARGETS += real_check
56 } else {
57 real_check.depends = release-check
58 real_check.target = check
59 QMAKE_EXTRA_TARGETS += real_check
60 }
61 }
62}
63
64}
65
Note: See TracBrowser for help on using the repository browser.