diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-01-29 17:25:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-02-03 14:13:19 +0000 |
commit | 3fc27e7835b0a058c991c115cea53a4377f556fa (patch) | |
tree | d30d88ee50f5d8cc594cf90ed5802d0ff3733050 /mkspecs/features/testcase.prf | |
parent | cc4c684e03ce85c1920afedd6c5efe5ab8822e4a (diff) |
fix env variable setup on unix for testcases when DESTDIR is set
prepend the 'cd' command only after prepending the variables, as
otherwise they'd apply to the cd command only.
Task-number: QTBUG-44183
Change-Id: Ibf96a16ce2c9cd9c0e80ca3cd5433e64ec19b136
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'mkspecs/features/testcase.prf')
-rw-r--r-- | mkspecs/features/testcase.prf | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 6656d1b898..770afa3386 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -21,9 +21,6 @@ debug_and_release:debug_and_release_target { TEST_TARGET_DIR = $$relative_path($$absolute_path($$DESTDIR, $$OUT_PWD), $$absolute_path($$TESTRUN_CWD, $$OUT_PWD)) } -!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD,^\\./?): \ - check.commands = cd $$shell_path($$TESTRUN_CWD) && - # Allow for a custom test runner script check.commands += $(TESTRUNNER) @@ -46,6 +43,10 @@ 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 + # If the test is marked as insignificant, discard the exit code insignificant_test:check.commands = -$${check.commands} |