Bug 7161 - clear out env so "make test" always works
clear out env so "make test" always works
Status: CLOSED FIXED
Product: ccache
Classification: Unclassified
Component: ccache
dev
All All
: P3 trivial
: 3.0
Assigned To: Joel Rosdahl
Joel Rosdahl
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-20 00:48 UTC by Owen Mann
Modified: 2010-07-09 04:18 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Mann 2010-02-20 00:48:25 UTC
This had me puzzled for a couple days. After perfecting my CCACHE_* variables, I wanted to take a crack at HEAD, but "make test" failed at:
SUITE: "base", TEST: "CCACHE_UNIFY" - Expected cache hit (preprocessed) to be 6, got 7

Unsetting the variables solved the problem; in particular CCACHE_UNIFY and CCACHE_TEMPDIR (made "find" fail). I figure just unsetting them all will make the tests run more predictably for present and future tests.

diff --git a/test.sh b/test.sh
index f583bdd..0f0e201 100755
--- a/test.sh
+++ b/test.sh
@@ -14,7 +14,7 @@ if [ -z "$CCACHE" ]; then
 fi
 TESTDIR=testdir.$$
 
-unset CCACHE_DISABLE
+unset CCACHE_BASEDIR CCACHE_CC CCACHE_CPP2 CCACHE_DIR CCACHE_DISABLE CCACHE_EXTENSION CCACHE_HARDLINK CCACHE_HASHDIR CCACHE_HASH_COMP
ILER CCACHE_LOGFILE CCACHE_NLEVELS CCACHE_NOCOMPRESS CCACHE_NODIRECT CCACHE_NOHASH_SIZE_MTIME CCACHE_NOSTATS CCACHE_PATH CCACHE_PREFIX
 CCACHE_READONLY CCACHE_RECACHE CCACHE_TEMPDIR CCACHE_UMASK CCACHE_UNIFY
 
 test_failed() {
     echo "SUITE: \"$testsuite\", TEST: \"$testname\" - $1"
Comment 1 Joel Rosdahl 2010-02-20 03:01:03 UTC
Thanks. Committed with a minor tweak as a04bed3.