From: Keith Packard Date: Mon, 28 Aug 2006 17:30:22 +0000 (-0700) Subject: During test run, remove cache directory to avoid stale cache usage. X-Git-Tag: 2.3.96~42 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7a03bbdceb4ea5b673caf89bfcafa84211a456f0;p=fontconfig.git 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. --- diff --git a/test/fonts.conf.in b/test/fonts.conf.in index 5ad85c9..95def72 100644 --- a/test/fonts.conf.in +++ b/test/fonts.conf.in @@ -1,5 +1,4 @@ @FONTDIR@ -@CACHEFILE@ @CACHEDIR@ diff --git a/test/run-test.sh b/test/run-test.sh index 8b817c0..e7174b2 100644 --- a/test/run-test.sh +++ b/test/run-test.sh @@ -2,7 +2,6 @@ TESTDIR=${srcdir-`pwd`} FONTDIR=`pwd`/fonts -CACHEFILE=`pwd`/fonts.cache CACHEDIR=`pwd`/cache.dir ECHO=true @@ -29,7 +28,7 @@ check () { } prep() { - rm -rf $CACHEFILE + rm -rf $CACHEDIR rm -rf $FONTDIR mkdir $FONTDIR } @@ -40,7 +39,6 @@ dotest () { } sed "s!@FONTDIR@!$FONTDIR! -s!@CACHEFILE@!$CACHEFILE! s!@CACHEDIR@!$CACHEDIR!" < $TESTDIR/fonts.conf.in > fonts.conf FONTCONFIG_FILE=`pwd`/fonts.conf