]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
adding tests
authorChris AtLee <catlee@mozilla.com>
Wed, 20 Jul 2011 06:04:52 +0000 (02:04 -0400)
committerChris AtLee <catlee@mozilla.com>
Wed, 20 Jul 2011 06:04:52 +0000 (02:04 -0400)
test.sh

diff --git a/test.sh b/test.sh
index 96bb4fc42d4f66690b4385ff9f454ae5a0a24942..78e6af4cb2a50b21488c8f57d880dd5d8eb35b97 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -487,6 +487,37 @@ EOF
     $CCACHE -C > /dev/null
     checkstat 'files in cache' 0
 
+    testname="profile-generate"
+    $CCACHE -Cz > /dev/null
+    $CCACHE_COMPILE -c -fprofile-generate test1.c
+    checkstat 'cache hit (preprocessed)' 0
+    checkstat 'cache miss' 1
+    checkstat 'files in cache' 1
+    $CCACHE_COMPILE -c -fprofile-generate test1.c
+    checkstat 'cache hit (preprocessed)' 1
+    checkstat 'cache miss' 1
+    checkstat 'files in cache' 1
+
+    testname="profile-arcs"
+    $CCACHE_COMPILE -c -fprofile-arcs test1.c
+    checkstat 'cache hit (preprocessed)' 1
+    checkstat 'cache miss' 2
+    checkstat 'files in cache' 2
+    $CCACHE_COMPILE -c -fprofile-arcs test1.c
+    checkstat 'cache hit (preprocessed)' 2
+    checkstat 'cache miss' 2
+    checkstat 'files in cache' 2
+
+    testname="profile-use"
+    $CCACHE_COMPILE -c -fprofile-use test1.c 2> /dev/null
+    checkstat 'cache hit (preprocessed)' 2
+    checkstat 'cache miss' 2
+    checkstat 'files in cache' 2
+    $CCACHE_COMPILE -c -fprofile-use test1.c 2> /dev/null
+    checkstat 'cache hit (preprocessed)' 2
+    checkstat 'cache miss' 2
+    checkstat 'files in cache' 2
+
     rm -f test1.c
 }