]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Make sure CCACHE_NODIRECT is set before running a test suite
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 16 Aug 2010 20:03:01 +0000 (22:03 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 16 Aug 2010 20:03:01 +0000 (22:03 +0200)
test.sh

diff --git a/test.sh b/test.sh
index e3594e40f9f6a6617ca11d52faa4b039f60cdc05..60a020ab610c27574a653cdcff2f384e39bfb15d 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -114,6 +114,8 @@ backdate() {
 
 run_suite() {
     rm -rf $CCACHE_DIR
+    CCACHE_NODIRECT=1
+    export CCACHE_NODIRECT
 
     echo "starting testsuite $1"
     testsuite=$1
@@ -1149,12 +1151,6 @@ EOF
     checkstat 'cache hit (direct)' 1
     checkstat 'cache hit (preprocessed)' 0
     checkstat 'cache miss' 1
-
-    ##################################################################
-    # Reset things.
-    CCACHE_NODIRECT=1
-    export CCACHE_NODIRECT
-    $CCACHE -C >/dev/null
 }
 
 basedir_suite() {
@@ -1286,9 +1282,6 @@ EOF
     if grep `pwd` stderr.txt >/dev/null 2>&1; then
         test_failed "Base dir (`pwd`) found in stderr:\n`cat stderr.txt`"
     fi
-
-    CCACHE_NODIRECT=1
-    export CCACHE_NODIRECT
 }
 
 compression_suite() {
@@ -1633,8 +1626,6 @@ CCACHE_DIR=`pwd`/.ccache
 export CCACHE_DIR
 CCACHE_LOGFILE=`pwd`/ccache.log
 export CCACHE_LOGFILE
-CCACHE_NODIRECT=1
-export CCACHE_NODIRECT
 
 # ---------------------------------------