From: Joel Rosdahl Date: Sun, 8 Aug 2010 20:26:33 +0000 (+0200) Subject: test: Add tests for CCACHE_COMPILERCHECK X-Git-Tag: v3.1~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e828cb8b985da559207003b2c355e546c1499dc;p=thirdparty%2Fccache.git test: Add tests for CCACHE_COMPILERCHECK --- diff --git a/test.sh b/test.sh index 150cfcb1e..3ae0bb61a 100755 --- a/test.sh +++ b/test.sh @@ -334,6 +334,60 @@ base_tests() { fi fi + testname="compilercheck=mtime" + $CCACHE -Cz >/dev/null + cat >compiler.sh </dev/null + CCACHE_COMPILERCHECK=content $CCACHE ./compiler.sh -c test1.c + checkstat 'cache hit (preprocessed)' 0 + checkstat 'cache miss' 1 + backdate compiler.sh + CCACHE_COMPILERCHECK=content $CCACHE ./compiler.sh -c test1.c + checkstat 'cache hit (preprocessed)' 1 + checkstat 'cache miss' 1 + echo "# Compiler upgrade" >>compiler.sh + backdate compiler.sh + CCACHE_COMPILERCHECK=content $CCACHE ./compiler.sh -c test1.c + checkstat 'cache hit (preprocessed)' 1 + checkstat 'cache miss' 2 + + testname="compilercheck=none" + $CCACHE -z >/dev/null + backdate compiler.sh + CCACHE_COMPILERCHECK=none $CCACHE ./compiler.sh -c test1.c + checkstat 'cache hit (preprocessed)' 0 + checkstat 'cache miss' 1 + CCACHE_COMPILERCHECK=none $CCACHE ./compiler.sh -c test1.c + checkstat 'cache hit (preprocessed)' 1 + checkstat 'cache miss' 1 + echo "# Compiler upgrade" >>compiler.sh + CCACHE_COMPILERCHECK=none $CCACHE ./compiler.sh -c test1.c + checkstat 'cache hit (preprocessed)' 2 + checkstat 'cache miss' 1 + testname="no object file" cat <<'EOF' >test_no_obj.c int test_no_obj;