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.
<fontconfig>
<dir>@FONTDIR@</dir>
-<cache>@CACHEFILE@</cache>
<cachedir>@CACHEDIR@</cachedir>
</fontconfig>
TESTDIR=${srcdir-`pwd`}
FONTDIR=`pwd`/fonts
-CACHEFILE=`pwd`/fonts.cache
CACHEDIR=`pwd`/cache.dir
ECHO=true
}
prep() {
- rm -rf $CACHEFILE
+ rm -rf $CACHEDIR
rm -rf $FONTDIR
mkdir $FONTDIR
}
}
sed "s!@FONTDIR@!$FONTDIR!
-s!@CACHEFILE@!$CACHEFILE!
s!@CACHEDIR@!$CACHEDIR!" < $TESTDIR/fonts.conf.in > fonts.conf
FONTCONFIG_FILE=`pwd`/fonts.conf