include:
- os: linux
compiler: gcc
- env: CFLAGS="-m32 -g -O2" LDFLAGS="-m32" HOST="--host=i386-linux-gnu"
+ env: CFLAGS="-m32 -g -O2" LDFLAGS="-m32" HOST="--host=i386-linux-gnu" ENABLE_CACHE_CLEANUP_TESTS=1
addons:
apt:
packages:
- lib32z1-dev
- os: linux
compiler: i686-w64-mingw32-gcc
- env: HOST="--host=i686-w64-mingw32" TEST="unittest/run.exe"
+ env: HOST="--host=i686-w64-mingw32" TEST="unittest/run.exe" ENABLE_CACHE_CLEANUP_TESTS=1
addons:
apt:
packages:
- gperf
- os: linux
compiler: clang
- env: CFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0"
+ env: CFLAGS="-fsanitize=undefined" LDFLAGS="-fsanitize=undefined" ASAN_OPTIONS="detect_leaks=0" ENABLE_CACHE_CLEANUP_TESTS=1
- os: linux
compiler: clang
- env: CFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=address" ASAN_OPTIONS="detect_leaks=0"
+ env: CFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=address" ASAN_OPTIONS="detect_leaks=0" ENABLE_CACHE_CLEANUP_TESTS=1
- os: linux
compiler: clang
- env: PATH="/usr/bin:$PATH" TEST=analyze
+ env: PATH="/usr/bin:$PATH" TEST=analyze ENABLE_CACHE_CLEANUP_TESTS=1
addons:
apt:
packages:
- gperf
- os: linux
compiler: gcc
- env: CUDA=8.0.61-1
+ env: CUDA=8.0.61-1 ENABLE_CACHE_CLEANUP_TESTS=1
sudo: required
before_install:
- source ./.travis/install_cuda.sh
done
# -------------------------------------------------------------------------
- TEST "Forced cache cleanup, size limit"
-
- # NOTE: This test is known to fail on filesystems that have unusual block
- # sizes, including ecryptfs. The workaround is to place the test directory
- # elsewhere:
- #
- # cd /tmp
- # CCACHE=$DIR/ccache $DIR/test.sh
-
- prepare_cleanup_test_dir $CCACHE_DIR/a
-
- $CCACHE -F 0 -M 256K >/dev/null
- $CCACHE -c >/dev/null
- expect_file_count 3 '*.o' $CCACHE_DIR
- expect_file_count 4 '*.d' $CCACHE_DIR
- expect_file_count 4 '*.stderr' $CCACHE_DIR
- expect_stat 'files in cache' 11
- expect_stat 'cleanups performed' 1
- for i in 0 1 2 3 4 5 6; do
- file=$CCACHE_DIR/a/result$i-4017.o
- expect_file_missing $file
- done
- for i in 7 8 9; do
- file=$CCACHE_DIR/a/result$i-4017.o
- expect_file_exists $file
- done
+ if [ -n "$ENABLE_CACHE_CLEANUP_TESTS" ]; then
+ TEST "Forced cache cleanup, size limit"
+
+ # NOTE: This test is known to fail on filesystems that have unusual block
+ # sizes, including ecryptfs. The workaround is to place the test directory
+ # elsewhere:
+ #
+ # cd /tmp
+ # CCACHE=$DIR/ccache $DIR/test.sh
+
+ prepare_cleanup_test_dir $CCACHE_DIR/a
+
+ $CCACHE -F 0 -M 256K >/dev/null
+ $CCACHE -c >/dev/null
+ expect_file_count 3 '*.o' $CCACHE_DIR
+ expect_file_count 4 '*.d' $CCACHE_DIR
+ expect_file_count 4 '*.stderr' $CCACHE_DIR
+ expect_stat 'files in cache' 11
+ expect_stat 'cleanups performed' 1
+ for i in 0 1 2 3 4 5 6; do
+ file=$CCACHE_DIR/a/result$i-4017.o
+ expect_file_missing $file
+ done
+ for i in 7 8 9; do
+ file=$CCACHE_DIR/a/result$i-4017.o
+ expect_file_exists $file
+ done
+ fi
# -------------------------------------------------------------------------
TEST "Automatic cache cleanup, limit_multiple 0.9"