fix pdfattach test

This commit is contained in:
Jean-Francois Dockes 2020-08-20 11:29:12 +02:00
parent 2c0fd8502a
commit e771a24148
2 changed files with 17 additions and 1 deletions

View File

@ -46,6 +46,9 @@ unac_except_trans = åå Åå ää Ää öö Öö üü Üü ßss œoe Œoe æae
pdfextrameta = pdf:Producer dc:identifier
pdfextrametafix = @RECOLL_TESTS@/config/pdfemf.py
# Can't use dir key as rclpdf doesnt call setkeydir
pdfattach = 1
[@RECOLL_TESTDATA@/pdf]
ocrprogs = tesseract
pdfocr = 1

View File

@ -69,14 +69,27 @@ makeindex() {
if test ! -f shared.sh ; then
fatal must be run in the top test directory
fi
checkcmds recollq recollindex pxattr xadump || exit 1
checkcmds recollq recollindex pxattr xadump pdftk || exit 1
iscmd pdftk
pdftk=$iscmdresult
tmpdir=${RECOLL_TMPDIR:-$TMPDIR}
case "$pdftk" in
/snap/*)
if test X$tmpdir = X -o "$tmpdir" = /tmp;then
fatal pdftk as snap need '$TMPDIR' to belong to you
fi
;;
esac
if test ! x$reroot = x ; then
rerootResults
fi
# Temp directory for test results
# Make sure this is computed in the same way as in shared.sh
toptmp=${TMPDIR:-/tmp}/recolltsttmp
test X"$toptmp" = X && fatal "empty toptmp??"
test X"$toptmp" = X/ && fatal "toptmp == / ??"
if test -d "$toptmp" ; then