]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Test that -D isn't hashed in preprocessor mode
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 1 Sep 2010 20:47:37 +0000 (22:47 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 1 Sep 2010 20:47:37 +0000 (22:47 +0200)
test.sh

diff --git a/test.sh b/test.sh
index eea318b03c745a75fec10f8378751f69ba36d20d..26618974a7d077532b924e9ab26c88d8b7882785 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -323,15 +323,20 @@ base_tests() {
     checkstat 'cache miss' 39
     checkstat 'unsupported source language' 2
 
+    testname="-D not hashed"
+    $CCACHE_COMPILE -DNOT_AFFECTING=1 -c test1.c 2>/dev/null
+    checkstat 'cache hit (preprocessed)' 14
+    checkstat 'cache miss' 39
+
     if [ -x /usr/bin/printf ]; then
         /usr/bin/printf '#include <wchar.h>\nwchar_t foo[] = L"\xbf";\n' >latin1.c
         if CCACHE_DISABLE=1 $COMPILER -c -finput-charset=latin1 latin1.c >/dev/null 2>&1; then
             testname="-finput-charset"
             CCACHE_CPP2=1 $CCACHE_COMPILE -c -finput-charset=latin1 latin1.c
-            checkstat 'cache hit (preprocessed)' 13
+            checkstat 'cache hit (preprocessed)' 14
             checkstat 'cache miss' 40
             $CCACHE_COMPILE -c -finput-charset=latin1 latin1.c
-            checkstat 'cache hit (preprocessed)' 14
+            checkstat 'cache hit (preprocessed)' 15
             checkstat 'cache miss' 40
         fi
     fi