summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/testcase.prf
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:30:57 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:35:24 +0100
commitad16478a76815f8f61d454bf7760aaf9ffbb4b51 (patch)
treeeefdd9219cc9d59b62e042f49fc7555b980cb7a4 /mkspecs/features/testcase.prf
parent80a741f3616290897ba0d9f1cbd3c9c5ee62da37 (diff)
parent09c92863001790a0304a5ef389901ee2b5b6cdc2 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
Diffstat (limited to 'mkspecs/features/testcase.prf')
-rw-r--r--mkspecs/features/testcase.prf9
1 files changed, 5 insertions, 4 deletions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 0340b7ed3c..e6eace190e 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -9,6 +9,11 @@ testcase_exceptions: CONFIG += exceptions
check.files =
check.path = .
+# Add environment for non-installed builds. Do this first, so the
+# 'make' variable expansions don't end up in a batch file/script.
+QT_TOOL_NAME = target
+qtAddTargetEnv(check.commands, QT)
+
# If the test ends up in a different directory, we should cd to that directory.
TESTRUN_CWD = $$DESTDIR
@@ -40,10 +45,6 @@ unix {
# Allow for custom arguments to tests
check.commands += $(TESTARGS)
-# Add environment for non-installed builds
-qtAddTargetEnv(check.commands, QT)
-
-# This must happen after adding the environment.
!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \
check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands