]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Made "stderr-files" test more robust against different compiler behaviours
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 9 Jun 2010 06:09:17 +0000 (08:09 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 9 Jun 2010 06:09:17 +0000 (08:09 +0200)
test.sh

diff --git a/test.sh b/test.sh
index b1ee28afb8aeaf4b19d81662fdfc2f0fe2648edc..daf0c71e4de303943d7545073181e002d4b14ff8 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -350,6 +350,7 @@ EOF
     checkstat 'compiler produced empty output' 1
 
     testname="stderr-files"
+    $CCACHE -Cz >/dev/null
     num=`find $CCACHE_DIR -name '*.stderr' | wc -l`
     if [ $num -ne 0 ]; then
         test_failed "$num stderr files found, expected 0"
@@ -360,19 +361,19 @@ int stderr(void)
        /* Trigger warning by having no return statement. */
 }
 EOF
-    checkstat 'files in cache' 3
+    checkstat 'files in cache' 0
     $CCACHE_COMPILE -Wall -W -c stderr.c 2>/dev/null
     num=`find $CCACHE_DIR -name '*.stderr' | wc -l`
     if [ $num -ne 1 ]; then
         test_failed "$num stderr files found, expected 1"
     fi
-    checkstat 'files in cache' 5
+    checkstat 'files in cache' 2
 
     testname="zero-stats"
     $CCACHE -z > /dev/null
     checkstat 'cache hit (preprocessed)' 0
     checkstat 'cache miss' 0
-    checkstat 'files in cache' 5
+    checkstat 'files in cache' 2
 
     testname="clear"
     $CCACHE -C > /dev/null