From: Francesco Chemolli Date: Fri, 6 Nov 2009 14:59:29 +0000 (+0100) Subject: Added --aggressively-use-config-cache test-builds.sh config-switch X-Git-Tag: SQUID_3_2_0_1~603 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=faa8207257eb11215eaff7cae81156923a735d8f;p=thirdparty%2Fsquid.git Added --aggressively-use-config-cache test-builds.sh config-switch which enables reusing config.cache across different testsuite runs. --- diff --git a/test-builds.sh b/test-builds.sh index bd25d39669..66ee6bc5f2 100755 --- a/test-builds.sh +++ b/test-builds.sh @@ -9,6 +9,7 @@ globalResult=0 cleanup="no" verbose="no" keepGoing="no" +remove_cache_file="true" while [ $# -ge 1 ]; do case "$1" in --cleanup) @@ -29,6 +30,14 @@ while [ $# -ge 1 ]; do 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 + remove_cache_file="false" + export cache_file + shift + ;; *) break ;; @@ -112,7 +121,7 @@ buildtest() { } # if using cache, make sure to clear it up first -if [ -n "$cache_file" -a -e "$cache_file" ]; then +if [ -n "$cache_file" -a -e "$cache_file" -a "$remove_cache_file" = "true" ]; then rm $cache_file fi @@ -148,4 +157,9 @@ for t in $tests; do fi done +# if using cache, make sure to clear it up first +if [ -n "$cache_file" -a -e "$cache_file" -a "$remove_cache_file" = "true" ]; then + rm $cache_file +fi + exit $globalResult