@@ -4,9 +4,10 @@ win32:!ReleaseBuild:!DebugBuild {
44 runtarget.recurse_target = run-tests
55 QMAKE_EXTRA_TARGETS += runtarget
66} else {
7- win32 :! win32 -g++ {
8- oneshell.target = .ONESHELL
7+ oneshell.target = .ONESHELL
8+ QMAKE_EXTRA_TARGETS += oneshell
99
10+ win32 :!win32 -g++ {
1011 CONFIG (debug , debug |release ): outdir_helper = debug
1112 CONFIG (release , debug |release ): outdir_helper = release
1213 runtarget.target = run-tests
@@ -18,45 +19,29 @@ win32:!ReleaseBuild:!DebugBuild {
1819 runtarget.commands += $$escape_expand (\ \n\\t)start /w call $(DESTDIR_TARGET) ^> $${outdir_helper}\\test.log ^|^| echo FAIL ^> $${outdir_helper}\\fail ^& exit 0
1920 runtarget.commands += $$escape_expand (\ \n\\t)type $${outdir_helper}\\test.log
2021 runtarget.commands += $$escape_expand (\ \n\\t)@if exist $${outdir_helper}\\fail exit 42
21- QMAKE_EXTRA_TARGETS += oneshell runtarget
22+ QMAKE_EXTRA_TARGETS += runtarget
2223 } else {
24+ win32 -g++: QMAKE_DIRLIST_SEP = " ;"
25+ runtarget.commands += export PATH =\ "$$shadowed($$dirname(_QMAKE_CONF_))/bin/:$$[QT_INSTALL_BINS]:$(PATH)\"
26+ runtarget.commands += $$escape_expand (\ \n\\t)export QT_PLUGIN_PATH=\"$$shadowed($$dirname(_QMAKE_CONF_))/plugins/$${QMAKE_DIRLIST_SEP}$(QT_PLUGIN_PATH)\"
27+ runtarget.commands += $$escape_expand (\ \n\\t)export QML2_IMPORT_PATH=\"$$shadowed($$dirname(_QMAKE_CONF_))/qml/$${QMAKE_DIRLIST_SEP}$(QML2_IMPORT_PATH)\"
28+ win32-g ++: QMAKE_DIRLIST_SEP = " :"
29+
2330 linux|win32 -g++ {
24- runtarget_env_lib.target = run-tests
25- runtarget_env_lib.depends = export LD_LIBRARY_PATH : = $$shadowed ($$dirname (_QMAKE_CONF_ ))/lib/: $$[QT_INSTALL_LIBS ]: $(LD_LIBRARY_PATH)
26- runtarget_env_qpa.target = run-tests
27- runtarget_env_qpa.depends += export QT_QPA_PLATFORM : = minimal
28- QMAKE_EXTRA_TARGETS += runtarget_env_lib
29- !win32 -g++: QMAKE_EXTRA_TARGETS += runtarget_env_qpa
31+ runtarget.commands += $$escape_expand (\ \n\\t)export LD_LIBRARY_PATH=\"$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(LD_LIBRARY_PATH)\"
32+ runtarget.commands += $$escape_expand (\ \n\\t)export QT_QPA_PLATFORM=minimal
3033 } else:mac {
31- runtarget_env_lib.target = run-tests
32- runtarget_env_lib.depends = export DYLD_LIBRARY_PATH : = $$shadowed ($$dirname (_QMAKE_CONF_ ))/lib/: $$[QT_INSTALL_LIBS ]: $(DYLD_LIBRARY_PATH)
33- runtarget_env_framework.target = run-tests
34- runtarget_env_framework.depends = export DYLD_FRAMEWORK_PATH : = $$shadowed ($$dirname (_QMAKE_CONF_ ))/lib/: $$[QT_INSTALL_LIBS ]: $(DYLD_FRAMEWORK_PATH)
35- QMAKE_EXTRA_TARGETS += \
36- runtarget_env_lib \
37- runtarget_env_framework
34+ runtarget.commands += $$escape_expand (\ \n\\t)export DYLD_LIBRARY_PATH=\"$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(DYLD_LIBRARY_PATH)\"
35+ runtarget.commands += $$escape_expand (\ \n\\t)export DYLD_FRAMEWORK_PATH=\"$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(DYLD_FRAMEWORK_PATH)\"
3836 }
3937
40- win32 -g++: QMAKE_DIRLIST_SEP = " ;"
41- runtarget_env_bin.target = run-tests
42- runtarget_env_bin.depends = export PATH : = $$shadowed ($$dirname (_QMAKE_CONF_ ))/bin/: $$[QT_INSTALL_BINS ]: $(PATH)
43- runtarget_env_plugins.target = run-tests
44- runtarget_env_plugins.depends = export QT_PLUGIN_PATH : = $$shadowed ($$dirname (_QMAKE_CONF_ ))/plugins/ $${QMAKE_DIRLIST_SEP }$(QT_PLUGIN_PATH)
45- runtarget_env_qml.target = run-tests
46- runtarget_env_qml.depends += export QML2_IMPORT_PATH : = $$shadowed ($$dirname (_QMAKE_CONF_ ))/qml/ $${QMAKE_DIRLIST_SEP }$(QML2_IMPORT_PATH)
47- QMAKE_EXTRA_TARGETS += \
48- runtarget_env_bin \
49- runtarget_env_plugins \
50- runtarget_env_qml
51- win32 -g++: QMAKE_DIRLIST_SEP = " :"
52-
5338 runtarget.target = run-tests
5439 win32 -g++ {
5540 runtarget.depends += $(DESTDIR_TARGET)
56- runtarget.commands = ./ $(DESTDIR_TARGET)
41+ runtarget.commands += $$ escape_expand ( \ \n\\t) ./$(DESTDIR_TARGET)
5742 } else {
5843 runtarget.depends += $(TARGET)
59- runtarget.commands = ./ $(TARGET)
44+ runtarget.commands += $$ escape_expand ( \ \n\\t) ./$(TARGET)
6045 }
6146 QMAKE_EXTRA_TARGETS += runtarget
6247 }
0 commit comments