From a50dd182a69e67485580a945ddf537f2637fd0a0 Mon Sep 17 00:00:00 2001 From: Skycoder42 Date: Fri, 3 Aug 2018 19:26:20 +0200 Subject: [PATCH] fixed testruns for mingw --- tests/auto/testrun.pri | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/auto/testrun.pri b/tests/auto/testrun.pri index 471d2e3..90d7fc6 100644 --- a/tests/auto/testrun.pri +++ b/tests/auto/testrun.pri @@ -5,19 +5,20 @@ win32 { runtarget.recurse_target = run-tests QMAKE_EXTRA_TARGETS += runtarget } else { + oneshell.target = .ONESHELL + + CONFIG(debug, debug|release): outdir_helper = debug + CONFIG(release, debug|release): outdir_helper = release runtarget.target = run-tests runtarget.depends += $(DESTDIR_TARGET) - win32-g++ { - runtarget.commands += @setlocal - runtarget.commands += $$escape_expand(\\n\\t)@set PATH=$$shell_path($$shadowed($$dirname(_QMAKE_CONF_))/bin);$$shell_path($$[QT_INSTALL_BINS]);$(PATH) - } else: runtarget.commands += @set PATH=$$shell_path($$shadowed($$dirname(_QMAKE_CONF_))/bin);$$shell_path($$[QT_INSTALL_BINS]);$(PATH) + runtarget.commands += @set PATH=$$shell_path($$shadowed($$dirname(_QMAKE_CONF_))/bin);$$shell_path($$[QT_INSTALL_BINS]);$(PATH) runtarget.commands += $$escape_expand(\\n\\t)@set QT_PLUGIN_PATH=$$shadowed($$dirname(_QMAKE_CONF_))/plugins;$(QT_PLUGIN_PATH) runtarget.commands += $$escape_expand(\\n\\t)@set QML2_IMPORT_PATH=$$shadowed($$dirname(_QMAKE_CONF_))/qml;$(QML2_IMPORT_PATH) - runtarget.commands += $$escape_expand(\\n\\t)@set QT_QPA_PLATFORM=minimal - runtarget.commands += $$escape_expand(\\n\\t)start /w call $(DESTDIR_TARGET) ^> $(DESTDIR)test.log ^|^| echo FAIL ^> fail ^& exit 0 - runtarget.commands += $$escape_expand(\\n\\t)type $(DESTDIR)test.log - runtarget.commands += $$escape_expand(\\n\\t)@if exist fail exit 42 - QMAKE_EXTRA_TARGETS += runtarget + runtarget.commands += $$escape_expand(\\n\\t)@if exist $${outdir_helper}\\fail del $${outdir_helper}\\fail + runtarget.commands += $$escape_expand(\\n\\t)start /w call $(DESTDIR_TARGET) ^> $${outdir_helper}\\test.log ^|^| echo FAIL ^> $${outdir_helper}\\fail ^& exit 0 + runtarget.commands += $$escape_expand(\\n\\t)type $${outdir_helper}\\test.log + runtarget.commands += $$escape_expand(\\n\\t)@if exist $${outdir_helper}\\fail exit 42 + QMAKE_EXTRA_TARGETS += oneshell runtarget } } else { linux {