don't clear config.log unless re-checking

it is counterproductive to clear the log when cached test results are
used, as that makes it hard to determine how they came to be.

-recheck isn't as clear-cut as -recheck-all, as only part of the results
is discarded, and we can't reasonably discard only part of the log. i
opted for clearing the log entirely, as having both the old and new
results in the log would be probably quite confusing.

Change-Id: Ibb391f2ba2ea86d73c23365d46cc66ed8a2158d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2016-11-02 17:08:26 +01:00
parent 2ad4d75754
commit 7ac15ab0ff
3 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,8 @@ cache()
load(configure_base)
recheck: write_file($$QMAKE_CONFIG_LOG, "")
isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
# Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1

View File

@ -44,4 +44,3 @@ defineTest(qtRunLoggedCommand) {
}
QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
write_file($$QMAKE_CONFIG_LOG, "")

View File

@ -1729,6 +1729,8 @@ equals(QMAKE_CONFIG_CACHE_USE, none) {
"cache.xplatform = $$[QMAKE_XSPEC]"
write_file($$QMAKE_CONFIG_CACHE, cont)
}
!equals(QMAKE_CONFIG_CACHE_USE, all): \
write_file($$QMAKE_CONFIG_LOG, "")
for (currentConfig, allConfigs) {
qtConfSetModuleName()