summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-24 14:02:58 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-25 11:59:54 +0000
commit15c39dfe3db5c4264b49cb53e80ec088ea4948e9 (patch)
treec097fa6adbbbd6dcf0320234bc929f9284a7db78
parent0f68ac251214754deb846c8c79f8fed95c12c4d2 (diff)
don't cache test result after pre-dep failure
there is no point in doing that, as we don't load it in that case anyway. in fact, it would lead to caching a new result in every run. Change-Id: Ia5cb27fa8a5d705d7f32a785b1e3b944f92d8929 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--mkspecs/features/qt_configure.prf34
1 files changed, 18 insertions, 16 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 64f0f48400..c503c7d0b6 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -870,7 +870,6 @@ defineTest(qtRunSingleTest) {
tpfx = config.tests.$${1}
defined($${tpfx}.result, var): \
return()
- result = true
type = $$eval($${tpfx}.type)
call = "qtConfTest_$$type"
@@ -880,24 +879,27 @@ defineTest(qtRunSingleTest) {
qtConfEnsureTestTypeDeps($$type)
preCall = "qtConfTestPrepare_$$type"
- defined($$preCall, test): \
- !$${preCall}($${tpfx}): result = false
-
- $$result {
- # note: we do this only after resolving the dependencies and the
- # preparation (which may resolve libraries), so that caching does
- # not alter the execution order (and thus the output).
- qtConfLoadResult($${tpfx}, $$1): \
- return()
+ defined($$preCall, test):!$${preCall}($${tpfx}) {
+ $${tpfx}.result = false
+ export($${tpfx}.result)
+ # don't cache the result; the pre-deps have their own caches.
+ return()
+ }
- qtLogTestIntro($${tpfx})
- msg = "executing config test $${1}"
- write_file($$QMAKE_CONFIG_LOG, msg, append)
+ # note: we do this only after resolving the dependencies and the
+ # preparation (which may resolve libraries), so that caching does
+ # not alter the execution order (and thus the output).
+ qtConfLoadResult($${tpfx}, $$1): \
+ return()
- !$${call}($${tpfx}): result = false
+ qtLogTestIntro($${tpfx})
+ msg = "executing config test $${1}"
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
- qtLogTestResult($${tpfx}, $$result)
- }
+ result = false
+ $${call}($${tpfx}): result = true
+
+ qtLogTestResult($${tpfx}, $$result)
$${tpfx}.result = $$result
export($${tpfx}.result)