From: Chris AtLee Date: Wed, 20 Jul 2011 06:04:52 +0000 (-0400) Subject: adding tests X-Git-Tag: v3.2~178^2~4^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=332bb5f00814ea358b8f61b6358e82d0acd4f620;p=thirdparty%2Fccache.git adding tests --- diff --git a/test.sh b/test.sh index 96bb4fc42..78e6af4cb 100755 --- 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 }