summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2021-04-23 09:04:12 +0000
committerGerrit Code Review <gerrit@fd.io>2021-04-23 09:04:12 +0000
commit8b096b06ec27886b0d4fb7e48073474d79afb9e2 (patch)
tree10e6ee91529a0c8348edd5db612b6c1b71f9f152 /jjb
parent07afa5e16b729b4a8e03b2e35cfee168c2c5dd76 (diff)
parent8702a6af537154bf10a38a874c0e93eed0fb5f32 (diff)
Merge "Refactor ccache config to use per-os ccache dirs."
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/scripts/setup_executor_env.sh28
1 files changed, 11 insertions, 17 deletions
diff --git a/jjb/scripts/setup_executor_env.sh b/jjb/scripts/setup_executor_env.sh
index f9aecfa4..a6b8216d 100755
--- a/jjb/scripts/setup_executor_env.sh
+++ b/jjb/scripts/setup_executor_env.sh
@@ -61,25 +61,19 @@ echo "$long_line"
echo "DNS nameserver config in '/etc/resolv.conf':"
cat /etc/resolv.conf || true
-if [ -n "${CCACHE_DIR:-}" ] ; then
- echo "$long_line"
- if [ -d "$CCACHE_DIR" ] ; then
- num_ccache_files="$(find $CCACHE_DIR -type f | wc -l)"
- ccache_conf="$CCACHE_DIR/ccache.conf"
- echo "CCACHE_DIR='$CCACHE_DIR' ($num_ccache_files ccache files):"
- du -sh /tmp/ccache
- df -h /tmp/ccache
- ls -l $CCACHE_DIR
- unset -v CCACHE_DISABLE
- if [ -f "$ccache_conf" ] ; then
- echo "Contents of $ccache_conf:"
- cat $ccache_conf
- fi
- else
+echo "$long_line"
+if [ -n "$(which ccache || true)" ] ; then
+ if [ -z "${CCACHE_DIR:-}" ] || [ ! -d "$CCACHE_DIR" ] ; then
echo "CCACHE_DIR='$CCACHE_DIR' is missing, disabling CCACHE..."
- unset -v CCACHE_DIR
export CCACHE_DISABLE="1"
- echo "CCACHE_DISABLE='${CCACHE_DISABLE:-}'"
fi
+ if [ -n "${CCACHE_DISABLE:-}" ] ; then
+ echo "CCACHE_DISABLE = '$CCACHE_DISABLE'"
+ fi
+ echo "ccache statistics:"
+ ccache -s
+else
+ echo "WARNING: ccache is not installed!"
+ export CCACHE_DISABLE="1"
fi
echo "$long_line"