From e771a2414828c63ee471eac234c4496ed9b85917 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 20 Aug 2020 11:29:12 +0200 Subject: [PATCH] fix pdfattach test --- tests/config/recoll.conf.in | 3 +++ tests/runtests.sh | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/config/recoll.conf.in b/tests/config/recoll.conf.in index 9389eebf..1084f93f 100644 --- a/tests/config/recoll.conf.in +++ b/tests/config/recoll.conf.in @@ -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 diff --git a/tests/runtests.sh b/tests/runtests.sh index 24675f25..e7086ae7 100644 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -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