xref: /freebsd/contrib/file/tests/Makefile.am (revision 2e3f49888ec8851bafb22011533217487764fdb0)
1check_PROGRAMS = test
2test_LDADD = $(top_builddir)/src/libmagic.la
3test_CPPFLAGS = -I$(top_builddir)/src
4
5EXTRA_DIST = \
6android-vdex-1.result \
7android-vdex-1.testfile \
8android-vdex-2.result \
9android-vdex-2.testfile \
10arj.result \
11arj.testfile \
12bcachefs.result \
13bcachefs.testfile \
14bcachefs2.result \
15bcachefs2.testfile \
16cl8m8ocofedso.result \
17cl8m8ocofedso.testfile \
18cmd1.result \
19cmd1.testfile \
20cmd2.result \
21cmd2.testfile \
22cmd3.result \
23cmd3.testfile \
24cmd4.result \
25cmd4.testfile \
26CVE-2014-1943.result \
27CVE-2014-1943.testfile \
28dsd64-dff.result \
29dsd64-dff.testfile \
30dsd64-dsf.result \
31dsd64-dsf.testfile \
32escapevel.result \
33escapevel.testfile \
34ext4.result \
35ext4.testfile \
36fit-map-data.result \
37fit-map-data.testfile \
38gedcom.result \
39gedcom.testfile \
40gpkg-1-zst.result \
41gpkg-1-zst.testfile \
42hello-racket_rkt.result \
43hello-racket_rkt.testfile \
44hddrawcopytool.result \
45hddrawcopytool.testfile \
46HWP2016.hwp.result \
47HWP2016.hwp.testfile \
48HWP2016.hwpx.zip.result \
49HWP2016.hwpx.zip.testfile \
50HWP97.hwp.result \
51HWP97.hwp.testfile \
52issue311docx.result \
53issue311docx.testfile \
54issue359xlsx.result \
55issue359xlsx.testfile \
56jpeg-text.result \
57jpeg-text.testfile \
58json1.result \
59json1.testfile \
60json2.result \
61json2.testfile \
62json3.result \
63json3.testfile \
64json4.result \
65json4.testfile \
66json5.result \
67json5.testfile \
68json6.result \
69json6.testfile \
70json7.result \
71json7.testfile \
72json8.result \
73json8.testfile \
74jsonlines1.result \
75jsonlines1.testfile \
76JW07022A.mp3.result \
77JW07022A.mp3.testfile \
78matilde.arm.result \
79matilde.arm.testfile \
80multiple-A.magic \
81multiple-B.magic \
82multiple.flags \
83multiple.result \
84multiple.testfile \
85pcjr.result \
86pcjr.testfile \
87pgp-binary-key-v2-phil.result \
88pgp-binary-key-v2-phil.testfile \
89pgp-binary-key-v3-lutz.result \
90pgp-binary-key-v3-lutz.testfile \
91pgp-binary-key-v4-dsa.result \
92pgp-binary-key-v4-dsa.testfile \
93pgp-binary-key-v4-ecc-no-userid-secret.result \
94pgp-binary-key-v4-ecc-no-userid-secret.testfile \
95pgp-binary-key-v4-ecc-secret-key.result \
96pgp-binary-key-v4-ecc-secret-key.testfile \
97pgp-binary-key-v4-rsa-key.result \
98pgp-binary-key-v4-rsa-key.testfile \
99pgp-binary-key-v4-rsa-no-userid-secret.result \
100pgp-binary-key-v4-rsa-no-userid-secret.testfile \
101pgp-binary-key-v4-rsa-secret-key.result \
102pgp-binary-key-v4-rsa-secret-key.testfile \
103pnm1.result \
104pnm1.testfile \
105pnm2.result \
106pnm2.testfile \
107pnm3.result \
108pnm3.testfile \
109regex-eol.magic \
110regex-eol.result \
111regex-eol.testfile \
112registry-pol.result \
113registry-pol.testfile \
114uf2.result \
115uf2.testfile \
116xclbin.result \
117xclbin.testfile \
118zstd-3-skippable-frames.result \
119zstd-dictionary-0.result \
120zstd-dictionary-1.result \
121zstd-dictionary-2.result \
122zstd-skippable-frame-0.result \
123zstd-skippable-frame-4.result \
124zstd-skippable-frame-8.result \
125zstd-skippable-frame-C.result \
126zstd-v0.2-FF.result \
127zstd-v0.2-FF.testfile \
128zstd-v0.3-FF.result \
129zstd-v0.3-FF.testfile \
130zstd-v0.4-FF.result \
131zstd-v0.4-FF.testfile \
132zstd-v0.5-FF.result \
133zstd-v0.5-FF.testfile \
134zstd-v0.6-FF.result \
135zstd-v0.6-FF.testfile \
136zstd-v0.7-00.result \
137zstd-v0.7-21.result \
138zstd-v0.7-21.testfile \
139zstd-v0.7-22.result \
140zstd-v0.7-22.testfile \
141zstd-v0.8-00.result \
142zstd-v0.8-01.result \
143zstd-v0.8-01.testfile \
144zstd-v0.8-02.result \
145zstd-v0.8-02.testfile \
146zstd-v0.8-03.result \
147zstd-v0.8-03.testfile \
148zstd-v0.8-16.result \
149zstd-v0.8-16.testfile \
150zstd-v0.8-20.result \
151zstd-v0.8-20.testfile \
152zstd-v0.8-21.result \
153zstd-v0.8-21.testfile \
154zstd-v0.8-22.result \
155zstd-v0.8-22.testfile \
156zstd-v0.8-23.result \
157zstd-v0.8-23.testfile \
158zstd-v0.8-F4.result \
159zstd-v0.8-F4.testfile \
160zstd-v0.8-FF.result \
161zstd-v0.8-FF.testfile
162
163T = $(top_srcdir)/tests
164check-local:
165	set -e; \
166	for i in $T/*.testfile; do \
167		t=$${i%%.testfile}; \
168		echo Running test: $$t; \
169		m=; \
170		for j in $$(eval echo $${t}\*.magic); do \
171			if [ -f "$$j" ]; then \
172				if [ -z "$$m" ]; then \
173					m=$$j; \
174				else \
175					m=$$m:$$j; \
176				fi \
177			fi \
178		done; \
179		if [ -z "$$m" ]; then \
180			m=$(top_builddir)/magic/magic; \
181		fi; \
182		f=-e; \
183		if [ -f $${t}.flags ]; then \
184			f=$$f$$(cat $${t}.flags); \
185		fi; \
186		echo TZ=UTC MAGIC=$$m ./test $$f $$i $${t}.result; \
187		TZ=UTC MAGIC=$$m ./test $$f $$i $${t}.result; \
188	done
189