]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add test case for CCACHE_COMPILERCHECK=string:<value>
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Mar 2015 19:53:16 +0000 (20:53 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Mar 2015 19:53:50 +0000 (20:53 +0100)
test.sh

diff --git a/test.sh b/test.sh
index a865c49911f19bf74714555b9a6c197929afb9ba..c4c23001da5474d6dd8a9d861ae147062476f909 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -455,6 +455,22 @@ EOF
     checkstat 'cache hit (preprocessed)' 2
     checkstat 'cache miss' 1
 
+    testname="compilercheck=string"
+    $CCACHE -z >/dev/null
+    backdate compiler.sh
+    CCACHE_COMPILERCHECK=string:foo $CCACHE ./compiler.sh -c test1.c
+    checkstat 'cache hit (preprocessed)' 0
+    checkstat 'cache miss' 1
+    CCACHE_COMPILERCHECK=string:foo $CCACHE ./compiler.sh -c test1.c
+    checkstat 'cache hit (preprocessed)' 1
+    checkstat 'cache miss' 1
+    CCACHE_COMPILERCHECK=string:bar $CCACHE ./compiler.sh -c test1.c
+    checkstat 'cache hit (preprocessed)' 1
+    checkstat 'cache miss' 2
+    CCACHE_COMPILERCHECK=string:bar $CCACHE ./compiler.sh -c test1.c
+    checkstat 'cache hit (preprocessed)' 2
+    checkstat 'cache miss' 2
+
     testname="compilercheck=command"
     $CCACHE -z >/dev/null
     backdate compiler.sh