Commit 01e4f088 authored by Akira TAGOH's avatar Akira TAGOH

Fix the fails of make check when SOURCE_DATE_EPOCH is set

Fixes #172
parent 8c44becd
Pipeline #53887 passed with stage
in 12 minutes and 40 seconds
...@@ -82,11 +82,17 @@ export FONTCONFIG_FILE ...@@ -82,11 +82,17 @@ export FONTCONFIG_FILE
dotest "Basic check" dotest "Basic check"
prep prep
cp $FONT1 $FONT2 $FONTDIR cp $FONT1 $FONT2 $FONTDIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR
fi
check check
dotest "With a subdir" dotest "With a subdir"
prep prep
cp $FONT1 $FONT2 $FONTDIR cp $FONT1 $FONT2 $FONTDIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR
fi
$FCCACHE $FONTDIR $FCCACHE $FONTDIR
check check
...@@ -94,6 +100,9 @@ dotest "Subdir with a cache file" ...@@ -94,6 +100,9 @@ dotest "Subdir with a cache file"
prep prep
mkdir $FONTDIR/a mkdir $FONTDIR/a
cp $FONT1 $FONT2 $FONTDIR/a cp $FONT1 $FONT2 $FONTDIR/a
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a
fi
$FCCACHE $FONTDIR/a $FCCACHE $FONTDIR/a
check check
...@@ -104,7 +113,13 @@ mkdir $FONTDIR/a/a ...@@ -104,7 +113,13 @@ mkdir $FONTDIR/a/a
mkdir $FONTDIR/b mkdir $FONTDIR/b
mkdir $FONTDIR/b/a mkdir $FONTDIR/b/a
cp $FONT1 $FONTDIR/a cp $FONT1 $FONTDIR/a
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a
fi
cp $FONT2 $FONTDIR/b/a cp $FONT2 $FONTDIR/b/a
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/b/a
fi
check check
dotest "Subdir with an out-of-date cache file" dotest "Subdir with an out-of-date cache file"
...@@ -141,6 +156,9 @@ if [ x"$BWRAP" != "x" -a "x$EXEEXT" = "x" ]; then ...@@ -141,6 +156,9 @@ if [ x"$BWRAP" != "x" -a "x$EXEEXT" = "x" ]; then
dotest "Basic functionality with the bind-mounted cache dir" dotest "Basic functionality with the bind-mounted cache dir"
prep prep
cp $FONT1 $FONT2 $FONTDIR cp $FONT1 $FONT2 $FONTDIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR
fi
$FCCACHE $FONTDIR $FCCACHE $FONTDIR
sleep 1 sleep 1
ls -l $CACHEDIR > out1 ls -l $CACHEDIR > out1
...@@ -180,6 +198,9 @@ rm -rf $TESTTMPDIR out1 out2 xxx flist1 flist2 bind-fonts.conf ...@@ -180,6 +198,9 @@ rm -rf $TESTTMPDIR out1 out2 xxx flist1 flist2 bind-fonts.conf
dotest "Different directory content between host and sandbox" dotest "Different directory content between host and sandbox"
prep prep
cp $FONT1 $FONTDIR cp $FONT1 $FONTDIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR
fi
$FCCACHE $FONTDIR $FCCACHE $FONTDIR
sleep 1 sleep 1
ls -1 --color=no $CACHEDIR/*cache*> out1 ls -1 --color=no $CACHEDIR/*cache*> out1
...@@ -187,6 +208,9 @@ stat -c '%n %s %y %z' `cat out1` > stat1 ...@@ -187,6 +208,9 @@ stat -c '%n %s %y %z' `cat out1` > stat1
TESTTMPDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` TESTTMPDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX`
TESTTMP2DIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` TESTTMP2DIR=`mktemp -d /tmp/fontconfig.XXXXXXXX`
cp $FONT2 $TESTTMP2DIR cp $FONT2 $TESTTMP2DIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $TESTTMP2DIR
fi
sed "s!@FONTDIR@!$TESTTMPDIR/fonts</dir><dir salt="'"'"salt-to-make-different"'"'">$FONTDIR! sed "s!@FONTDIR@!$TESTTMPDIR/fonts</dir><dir salt="'"'"salt-to-make-different"'"'">$FONTDIR!
s!@REMAPDIR@!<remap-dir as-path="'"'"$FONTDIR"'"'">$TESTTMPDIR/fonts</remap-dir>! s!@REMAPDIR@!<remap-dir as-path="'"'"$FONTDIR"'"'">$TESTTMPDIR/fonts</remap-dir>!
s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < $TESTDIR/fonts.conf.in > bind-fonts.conf s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < $TESTDIR/fonts.conf.in > bind-fonts.conf
...@@ -227,6 +251,9 @@ dotest "Check consistency of MD5 in cache name" ...@@ -227,6 +251,9 @@ dotest "Check consistency of MD5 in cache name"
prep prep
mkdir -p $FONTDIR/sub mkdir -p $FONTDIR/sub
cp $FONT1 $FONTDIR/sub cp $FONT1 $FONTDIR/sub
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/sub
fi
$FCCACHE $FONTDIR $FCCACHE $FONTDIR
sleep 1 sleep 1
(cd $CACHEDIR; ls -1 --color=no *cache*) > out1 (cd $CACHEDIR; ls -1 --color=no *cache*) > out1
...@@ -251,6 +278,9 @@ rm -rf $TESTTMPDIR out1 out2 bind-fonts.conf ...@@ -251,6 +278,9 @@ rm -rf $TESTTMPDIR out1 out2 bind-fonts.conf
dotest "Fallback to uuid" dotest "Fallback to uuid"
prep prep
cp $FONT1 $FONTDIR cp $FONT1 $FONTDIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR
fi
touch -d @`stat -c %Y $FONTDIR` $FONTDIR touch -d @`stat -c %Y $FONTDIR` $FONTDIR
$FCCACHE $FONTDIR $FCCACHE $FONTDIR
sleep 1 sleep 1
...@@ -291,6 +321,9 @@ mkdir -p $MyPWD/sysroot/$FONTDIR ...@@ -291,6 +321,9 @@ mkdir -p $MyPWD/sysroot/$FONTDIR
mkdir -p $MyPWD/sysroot/$CACHEDIR mkdir -p $MyPWD/sysroot/$CACHEDIR
mkdir -p $MyPWD/sysroot/$MyPWD mkdir -p $MyPWD/sysroot/$MyPWD
cp $FONT1 $MyPWD/sysroot/$FONTDIR cp $FONT1 $MyPWD/sysroot/$FONTDIR
if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $MyPWD/sysroot/$FONTDIR
fi
cp $MyPWD/fonts.conf $MyPWD/sysroot/$MyPWD/fonts.conf cp $MyPWD/fonts.conf $MyPWD/sysroot/$MyPWD/fonts.conf
$FCCACHE -y $MyPWD/sysroot $FCCACHE -y $MyPWD/sysroot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment