j=`expr $j + 1`
done
- $DIRECT_COMPILE -c -o compiler_direct_test1.o test1.c
+ CCACHE_DISABLE=1 $COMPILER -c -o reference_test1.o test1.c
testname="BASIC"
$CCACHE_COMPILE -c test1.c
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkstat 'files in cache' 1
- compare_file compiler_direct_test1.o test1.o
+ compare_file reference_test1.o test1.o
testname="BASIC2"
$CCACHE_COMPILE -c test1.c
checkstat 'cache hit (preprocessed)' 1
checkstat 'cache miss' 1
checkstat 'files in cache' 1
- compare_file compiler_direct_test1.o test1.o
+ compare_file reference_test1.o test1.o
testname="debug"
$CCACHE_COMPILE -c test1.c -g
$CCACHE_COMPILE -c test1.c -o foo.o
checkstat 'cache hit (preprocessed)' 3
checkstat 'cache miss' 2
- compare_file compiler_direct_test1.o foo.o
+ compare_file reference_test1.o foo.o
testname="link"
$CCACHE_COMPILE test1.c -o test 2> /dev/null
CCACHE_CPP2=1 $CCACHE_COMPILE -c test1.c -O -O
checkstat 'cache hit (preprocessed)' 4
checkstat 'cache miss' 3
- $DIRECT_COMPILE -c test1.c -o compiler_direct_test1.o -O -O
- compare_file compiler_direct_test1.o test1.o
+ CCACHE_DISABLE=1 $COMPILER -c test1.c -o reference_test1.o -O -O
+ compare_file reference_test1.o test1.o
CCACHE_CPP2=1 $CCACHE_COMPILE -c test1.c -O -O
checkstat 'cache hit (preprocessed)' 5
checkstat 'cache miss' 3
- compare_file compiler_direct_test1.o test1.o
+ compare_file reference_test1.o test1.o
testname="CCACHE_NOSTATS"
CCACHE_NOSTATS=1 $CCACHE_COMPILE -c test1.c -O -O
CCACHE_RECACHE=1 $CCACHE_COMPILE -c test1.c -O -O
checkstat 'cache hit (preprocessed)' 5
checkstat 'cache miss' 4
- compare_file compiler_direct_test1.o test1.o
+ compare_file reference_test1.o test1.o
# strictly speaking should be 3 - RECACHE causes a double counting!
checkstat 'files in cache' 4
CCACHE_HASHDIR=1 $CCACHE_COMPILE -c test1.c -O -O
checkstat 'cache hit (preprocessed)' 5
checkstat 'cache miss' 5
- compare_file compiler_direct_test1.o test1.o
+ compare_file reference_test1.o test1.o
CCACHE_HASHDIR=1 $CCACHE_COMPILE -c test1.c -O -O
checkstat 'cache hit (preprocessed)' 6
checkstat 'cache miss' 5
checkstat 'files in cache' 4
- compare_file compiler_direct_test1.o test1.o
+ compare_file reference_test1.o test1.o
testname="comments"
echo '/* a silly comment */' > test1-comment.c
mv test1-saved.c test1.c
checkstat 'cache hit (preprocessed)' 7
checkstat 'cache miss' 7
- $DIRECT_COMPILE -c test1.c -o compiler_direct_test1.o
- compare_file compiler_direct_test1.o test1.o
+ CCACHE_DISABLE=1 $COMPILER -c test1.c -o reference_test1.o
+ compare_file reference_test1.o test1.o
testname="cache-size"
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- $DIRECT_COMPILE -c -Wp,-MD,other.d test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -Wp,-MD,other.d test.c -o reference_test.o
+ compare_file reference_test.o test.o
rm -f other.d
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
rm -f other.d
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- $DIRECT_COMPILE -c -Wp,-MMD,other.d test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -Wp,-MMD,other.d test.c -o reference_test.o
+ compare_file reference_test.o test.o
rm -f other.d
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
rm -f other.d
checkstat 'cache hit (direct)' 0
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
- $DIRECT_COMPILE -c -Wp,-MD,$DEVNULL,-P test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -Wp,-MD,$DEVNULL,-P test.c -o reference_test.o
+ compare_file reference_test.o test.o
$CCACHE $COMPILER -c -Wp,-MD,$DEVNULL,-P test.c
checkstat 'cache hit (direct)' 0
checkstat 'cache hit (preprocessed)' 1
checkstat 'cache miss' 1
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
fi
##################################################################
checkstat 'cache hit (direct)' 0
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
- $DIRECT_COMPILE -c -Wp,-MMD,$DEVNULL,-P test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -Wp,-MMD,$DEVNULL,-P test.c -o reference_test.o
+ compare_file reference_test.o test.o
$CCACHE $COMPILER -c -Wp,-MMD,$DEVNULL,-P test.c
checkstat 'cache hit (direct)' 0
checkstat 'cache hit (preprocessed)' 1
checkstat 'cache miss' 1
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
fi
##################################################################
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile test.d "test.o: test.c test1.h test3.h test2.h"
- $DIRECT_COMPILE -c -MD test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -MD test.c -o reference_test.o
+ compare_file reference_test.o test.o
rm -f test.d
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile test.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
##################################################################
# Check the scenario of running a ccache with direct mode on a cache
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile test.d "test.o: test.c test1.h test3.h test2.h"
- $DIRECT_COMPILE -c -MD test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -MD test.c -o reference_test.o
+ compare_file reference_test.o test.o
rm -f test.d
checkstat 'cache hit (preprocessed)' 1
checkstat 'cache miss' 1
checkfile test.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
rm -f test.d
checkstat 'cache hit (preprocessed)' 2
checkstat 'cache miss' 1
checkfile test.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
rm -f test.d
checkstat 'cache hit (preprocessed)' 2
checkstat 'cache miss' 1
checkfile test.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
##################################################################
# Check that -MF works.
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- $DIRECT_COMPILE -c -MD -MF other.d test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -MD -MF other.d test.c -o reference_test.o
+ compare_file reference_test.o test.o
rm -f other.d
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
##################################################################
# Check that a missing .d file in the cache is handled correctly.
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- $DIRECT_COMPILE -c -MD test.c -o compiler_direct_test.o
- compare_file compiler_direct_test.o test.o
+ CCACHE_DISABLE=1 $COMPILER -c -MD test.c -o reference_test.o
+ compare_file reference_test.o test.o
$CCACHE $COMPILER -c -MD test.c
checkstat 'cache hit (direct)' 1
checkstat 'cache hit (preprocessed)' 0
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
find $CCACHE_DIR -name '*.d' -exec rm -f '{}' \;
checkstat 'cache hit (preprocessed)' 1
checkstat 'cache miss' 1
checkfile other.d "test.o: test.c test1.h test3.h test2.h"
- compare_file compiler_direct_test.o test.o
+ compare_file reference_test.o test.o
##################################################################
# Check that stderr from both the preprocessor and the compiler is emitted
export CCACHE_CONFIGPATH
touch $CCACHE_CONFIGPATH
-# comand used to bypass ccache
-DIRECT_COMPILE=`which $COMPILER`
-
# ---------------------------------------
all_suites="