]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added --aggressively-use-config-cache test-builds.sh config-switch
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 6 Nov 2009 14:59:29 +0000 (15:59 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 6 Nov 2009 14:59:29 +0000 (15:59 +0100)
which enables reusing config.cache across different testsuite runs.

test-builds.sh

index bd25d396697ad535728cb89e5874abad277f4e1b..66ee6bc5f2af477db7722c7812b8048fa769d66a 100755 (executable)
@@ -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