From 15c39dfe3db5c4264b49cb53e80ec088ea4948e9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 24 Aug 2016 14:02:58 +0200 Subject: 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 --- mkspecs/features/qt_configure.prf | 34 ++++++++++++++++++---------------- 1 file 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) -- cgit v1.2.3