diff options
Diffstat (limited to 'contrib/file/tests/Makefile.am')
-rw-r--r-- | contrib/file/tests/Makefile.am | 88 |
1 files changed, 78 insertions, 10 deletions
diff --git a/contrib/file/tests/Makefile.am b/contrib/file/tests/Makefile.am index b44944346c0c..36b4ff206c2a 100644 --- a/contrib/file/tests/Makefile.am +++ b/contrib/file/tests/Makefile.am @@ -7,14 +7,28 @@ android-vdex-1.result \ android-vdex-1.testfile \ android-vdex-2.result \ android-vdex-2.testfile \ -CVE-2014-1943.result \ -CVE-2014-1943.testfile \ -JW07022A.mp3.result \ -JW07022A.mp3.testfile \ +arj.result \ +arj.testfile \ bcachefs.result \ bcachefs.testfile \ +bcachefs2.result \ +bcachefs2.testfile \ cl8m8ocofedso.result \ cl8m8ocofedso.testfile \ +cmd1.result \ +cmd1.testfile \ +cmd2.result \ +cmd2.testfile \ +cmd3.result \ +cmd3.testfile \ +cmd4.result \ +cmd4.testfile \ +CVE-2014-1943.result \ +CVE-2014-1943.testfile \ +dsd64-dff.result \ +dsd64-dff.testfile \ +dsd64-dsf.result \ +dsd64-dsf.testfile \ escapevel.result \ escapevel.testfile \ ext4.result \ @@ -23,20 +37,51 @@ fit-map-data.result \ fit-map-data.testfile \ gedcom.result \ gedcom.testfile \ +gpkg-1-zst.result \ +gpkg-1-zst.testfile \ +hello-racket_rkt.result \ +hello-racket_rkt.testfile \ hddrawcopytool.result \ hddrawcopytool.testfile \ +HWP2016.hwp.result \ +HWP2016.hwp.testfile \ +HWP2016.hwpx.zip.result \ +HWP2016.hwpx.zip.testfile \ +HWP97.hwp.result \ +HWP97.hwp.testfile \ issue311docx.result \ issue311docx.testfile \ issue359xlsx.result \ issue359xlsx.testfile \ +jpeg-text.result \ +jpeg-text.testfile \ json1.result \ json1.testfile \ json2.result \ json2.testfile \ json3.result \ json3.testfile \ +json4.result \ +json4.testfile \ +json5.result \ +json5.testfile \ +json6.result \ +json6.testfile \ +json7.result \ +json7.testfile \ +json8.result \ +json8.testfile \ +jsonlines1.result \ +jsonlines1.testfile \ +JW07022A.mp3.result \ +JW07022A.mp3.testfile \ matilde.arm.result \ matilde.arm.testfile \ +multiple-A.magic \ +multiple-B.magic \ +multiple.flags \ +multiple.result \ +multiple.testfile \ pcjr.result \ pcjr.testfile \ pgp-binary-key-v2-phil.result \ @@ -55,11 +100,21 @@ pgp-binary-key-v4-rsa-no-userid-secret.result \ pgp-binary-key-v4-rsa-no-userid-secret.testfile \ pgp-binary-key-v4-rsa-secret-key.result \ pgp-binary-key-v4-rsa-secret-key.testfile \ +pnm1.result \ +pnm1.testfile \ +pnm2.result \ +pnm2.testfile \ +pnm3.result \ +pnm3.testfile \ regex-eol.magic \ regex-eol.result \ regex-eol.testfile \ +registry-pol.result \ +registry-pol.testfile \ uf2.result \ uf2.testfile \ +xclbin.result \ +xclbin.testfile \ zstd-3-skippable-frames.result \ zstd-dictionary-0.result \ zstd-dictionary-1.result \ @@ -107,14 +162,27 @@ zstd-v0.8-FF.testfile T = $(top_srcdir)/tests check-local: - MAGIC=$(top_builddir)/magic/magic ./test set -e; \ for i in $T/*.testfile; do \ - echo Running test: $$i; \ - if [ -f $${i%%.testfile}.magic ]; then \ - m=$${i%%.testfile}.magic; \ - else \ + t=$${i%%.testfile}; \ + echo Running test: $$t; \ + m=; \ + for j in $$(eval echo $${t}\*.magic); do \ + if [ -f "$$j" ]; then \ + if [ -z "$$m" ]; then \ + m=$$j; \ + else \ + m=$$m:$$j; \ + fi \ + fi \ + done; \ + if [ -z "$$m" ]; then \ m=$(top_builddir)/magic/magic; \ fi; \ - TZ=UTC MAGIC=$$m ./test $$i $${i%%.testfile}.result; \ + f=-e; \ + if [ -f $${t}.flags ]; then \ + f=$$f$$(cat $${t}.flags); \ + fi; \ + echo TZ=UTC MAGIC=$$m ./test $$f $$i $${t}.result; \ + TZ=UTC MAGIC=$$m ./test $$f $$i $${t}.result; \ done |