]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Tests: Support passing a custom config.cache to test builds (#570)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 1 Apr 2020 21:53:47 +0000 (21:53 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Mon, 13 Apr 2020 13:53:58 +0000 (01:53 +1200)
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

index c9e68ab94a23929f515261a26660e1897a2ce65d..27defc7551e5d32c4db3a50190fe70862cc8ffed 100755 (executable)
@@ -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
        ;;