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>
This commit is contained in:
Oswald Buddenhagen 2016-08-24 14:02:58 +02:00
parent 0f68ac2512
commit 15c39dfe3d

View File

@ -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,25 +879,28 @@ 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()
qtLogTestIntro($${tpfx})
msg = "executing config test $${1}"
write_file($$QMAKE_CONFIG_LOG, msg, append)
!$${call}($${tpfx}): result = false
qtLogTestResult($${tpfx}, $$result)
defined($$preCall, test):!$${preCall}($${tpfx}) {
$${tpfx}.result = false
export($${tpfx}.result)
# don't cache the result; the pre-deps have their own caches.
return()
}
# 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()
qtLogTestIntro($${tpfx})
msg = "executing config test $${1}"
write_file($$QMAKE_CONFIG_LOG, msg, append)
result = false
$${call}($${tpfx}): result = true
qtLogTestResult($${tpfx}, $$result)
$${tpfx}.result = $$result
export($${tpfx}.result)
qtConfSaveResult($${tpfx}, $$1)