]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add test case for clang_index_store sloppiness
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 10 Dec 2018 20:11:17 +0000 (21:11 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 10 Dec 2018 20:11:17 +0000 (21:11 +0100)
test/suites/direct.bash

index f12d6c481fd3bc04f759755442bf2b322e340608..f3025b139d8ac47c08b3da18b6accfcd1329894c 100644 (file)
@@ -744,6 +744,19 @@ EOF
     expect_stat 'cache hit (preprocessed)' 0
     expect_stat 'cache miss' 1
 
+    # -------------------------------------------------------------------------
+    TEST "Sloppy Clang index store"
+
+    CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS clang_index_store" $CCACHE_COMPILE -index-store-path foo -c test.c
+    expect_stat 'cache hit (direct)' 0
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 1
+
+    CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS clang_index_store" $CCACHE_COMPILE -index-store-path bar -c test.c
+    expect_stat 'cache hit (direct)' 1
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 1
+
     # -------------------------------------------------------------------------
     # Check that environment variables that affect the preprocessor are taken
     # into account.