During test run, remove cache directory to avoid stale cache usage.

As file timestamps have only one second granularity, an old cache
file could easily be used when a test took less than 1 second to run.
Just remove the cache directory and its contents before each test is run.
Also, remove mention of the old cache file from the test config file.
This commit is contained in:
Keith Packard 2006-08-28 10:30:22 -07:00
parent 1e4080ea49
commit 7a03bbdceb
2 changed files with 1 additions and 4 deletions

View File

@ -1,5 +1,4 @@
<fontconfig> <fontconfig>
<dir>@FONTDIR@</dir> <dir>@FONTDIR@</dir>
<cache>@CACHEFILE@</cache>
<cachedir>@CACHEDIR@</cachedir> <cachedir>@CACHEDIR@</cachedir>
</fontconfig> </fontconfig>

View File

@ -2,7 +2,6 @@
TESTDIR=${srcdir-`pwd`} TESTDIR=${srcdir-`pwd`}
FONTDIR=`pwd`/fonts FONTDIR=`pwd`/fonts
CACHEFILE=`pwd`/fonts.cache
CACHEDIR=`pwd`/cache.dir CACHEDIR=`pwd`/cache.dir
ECHO=true ECHO=true
@ -29,7 +28,7 @@ check () {
} }
prep() { prep() {
rm -rf $CACHEFILE rm -rf $CACHEDIR
rm -rf $FONTDIR rm -rf $FONTDIR
mkdir $FONTDIR mkdir $FONTDIR
} }
@ -40,7 +39,6 @@ dotest () {
} }
sed "s!@FONTDIR@!$FONTDIR! sed "s!@FONTDIR@!$FONTDIR!
s!@CACHEFILE@!$CACHEFILE!
s!@CACHEDIR@!$CACHEDIR!" < $TESTDIR/fonts.conf.in > fonts.conf s!@CACHEDIR@!$CACHEDIR!" < $TESTDIR/fonts.conf.in > fonts.conf
FONTCONFIG_FILE=`pwd`/fonts.conf FONTCONFIG_FILE=`pwd`/fonts.conf