summaryrefslogtreecommitdiff
path: root/test/suites/base.bash
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2020-09-21 07:59:50 +0200
committerJoel Rosdahl <joel@rosdahl.net>2020-09-23 09:41:38 +0200
commitb16001a67f4389956ef6e7ccf7d8023684b57119 (patch)
treec72f1e51a57b4d26607a7e188638c9605f6953f3 /test/suites/base.bash
parent9ce6f76a27d0c1a42d1d16805913850352ae804f (diff)
downloadccache-b16001a67f4389956ef6e7ccf7d8023684b57119.tar.gz
Use short type suffix for cache files
x.result -> xR x.manifest -> xM x_n.raw -> xnW Reducing file lengths should be beneficial since it reduces the number of needed system calls when scanning many files in the cache. The effect is very small but there is no real downside. A one letter suffix is kept to allow for making decisions based on file type without having to open the file. The suffix is uppercase so that is doesn’t clash with pre-4.0 *.stderr files stored in the cache.
Diffstat (limited to 'test/suites/base.bash')
-rw-r--r--test/suites/base.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/suites/base.bash b/test/suites/base.bash
index f48e7b84..d480413c 100644
--- a/test/suites/base.bash
+++ b/test/suites/base.bash
@@ -271,7 +271,7 @@ base_tests() {
TEST "Result file is compressed"
$CCACHE_COMPILE -c test1.c
- result_file=$(find $CCACHE_DIR -name '*.result')
+ result_file=$(find $CCACHE_DIR -name '*R')
if ! $CCACHE --dump-result $result_file | grep 'Compression type: zstd' >/dev/null 2>&1; then
test_failed "Result file not uncompressed according to metadata"
fi
@@ -292,7 +292,7 @@ base_tests() {
expect_stat 'cache miss' 1
expect_stat 'files in cache' 1
- result_file=$(find $CCACHE_DIR -name '*.result')
+ result_file=$(find $CCACHE_DIR -name '*R')
printf foo | dd of=$result_file bs=3 count=1 seek=20 conv=notrunc >&/dev/null
$CCACHE_COMPILE -c test1.c
@@ -907,7 +907,7 @@ EOF
$CCACHE_COMPILE -MMD -c test.c
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
- result_file=$(find $CCACHE_DIR -name '*.result')
+ result_file=$(find $CCACHE_DIR -name '*R')
level_2_dir=$(dirname $result_file)
level_1_dir=$(dirname $(dirname $result_file))
expect_perm test.o -rw-r--r--