diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-12-04 21:00:38 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-12-14 18:02:30 +0000 |
commit | fd3423bfb82f44723fd59991ba56adc3ed112412 (patch) | |
tree | 56e148f4df350d3df259a04d46e4b595c978f3de /mkspecs | |
parent | af70d4ee85246031ff631488a9191034bf3baa7a (diff) |
configure: support discarding selected test results with -recheck
especially during debugging, it is often necessary to re-run only one
(or a few) tests, where -recheck-all would be wasteful.
Task-number: QTBUG-64059
Change-Id: I9410894dec4289ff832d7f75e04f9b60fe76c57c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/data/configure.json | 2 | ||||
-rw-r--r-- | mkspecs/features/qt_configure.prf | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/mkspecs/features/data/configure.json b/mkspecs/features/data/configure.json index 38623d46a4..167c502e82 100644 --- a/mkspecs/features/data/configure.json +++ b/mkspecs/features/data/configure.json @@ -9,7 +9,7 @@ "continue": "void", - "recheck": { "type": "void", "name": "cache_use", "value": "positive" }, + "recheck": { "type": "optionalString", "name": "cache_recheck" }, "recheck-all": { "type": "void", "name": "cache_use", "value": "none" }, "redo": { "type": "redo" }, diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index dcd87a7a1a..6ab40e53ec 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -2041,14 +2041,28 @@ qtConfCheckErrors() QMAKE_CONFIG_CACHE = $$OUT_PWD/config.cache QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use) +cache_recheck = $$eval(config.input.cache_recheck) +equals(cache_recheck, yes) { + QMAKE_CONFIG_CACHE_USE = positive + cache_recheck = +} isEmpty(QMAKE_CONFIG_CACHE_USE): \ QMAKE_CONFIG_CACHE_USE = all !equals(QMAKE_CONFIG_CACHE_USE, none) { include($$QMAKE_CONFIG_CACHE, , true) # this crudely determines when to discard the cache. this also catches the case # of no cache being there in the first place. - !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]): \ + !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]) { QMAKE_CONFIG_CACHE_USE = none + } else: !isEmpty(cache_recheck) { + for (cr, $$list($$split(cache_recheck, ","))) { + !isEmpty(cache.$${cr}._KEYS_) { + cache.$${cr}._KEYS_ = + } else { + qtConfAddWarning("Attempting to discard non-cached result '$$cr'.") + } + } + } } equals(QMAKE_CONFIG_CACHE_USE, none) { cont = \ |