From 1a638be4498cca70a7e34170b471e1342cedb6cb Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Wed, 1 Apr 2020 21:53:47 +0000 Subject: [PATCH] Tests: Support passing a custom config.cache to test builds (#570) usage: $ cache_file=/tmp/custom-config.cache ./test-builds.sh \ --aggressively-use-config-cache \ --config-cache-file=somefile.ccache Already bootstrapped, skipping step TESTING: layer-00-default --- test-builds.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test-builds.sh b/test-builds.sh index c9e68ab94a..27defc7551 100755 --- a/test-builds.sh +++ b/test-builds.sh @@ -39,18 +39,24 @@ while [ $# -ge 1 ]; do ;; --use-config-cache) #environment variable will be picked up by buildtest.sh - cache_file=/tmp/config.cache.$$ + cache_file=${cache_file:-/tmp/config.cache.$$} export cache_file shift ;; --aggressively-use-config-cache) #environment variable will be picked up by buildtest.sh #note: use ONLY if you know what you're doing - cache_file=/tmp/config.cache + cache_file=${cache_file:-/tmp/config.cache} remove_cache_file="false" export cache_file shift ;; + --config-cache-file) + cache_file="$2" + remove_cache_file="false" + export cache_file + shift 2 + ;; *) break ;; -- 2.47.3