summaryrefslogtreecommitdiffstats
path: root/pigeonhole/Makefile.am
blob: 1dfb0e6f4146c03e02e0d649b52e79a06ec97907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
aclocaldir = $(datadir)/aclocal

if BUILD_DOCS
DOCS = doc
endif

SUBDIRS = \
	. \
	src \
	$(DOCS)

ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = \
	tests \
	examples \
	COPYING.LGPL \
	ChangeLog \
	update-version.sh

dist-hook:
	rm -rf `find $(distdir)/tests -type f -name '*.svbin'`

pkginc_libdir=$(dovecot_pkgincludedir)/sieve
dist_pkginc_lib_HEADERS = \
    pigeonhole-version.h
nodist_pkginc_lib_HEADERS = \
	pigeonhole-config.h

ChangeLog:
	git log --name-status \
		--pretty="format:%ai %aN <%aE> (%h)%n%n%w(80,4,4)%s%n%n%b" > ChangeLog \
			|| rm -f ChangeLog

dist_aclocal_DATA = dovecot-pigeonhole.m4

pigeonhole-version.h: noop
	$(SHELL) $(top_srcdir)/update-version.sh $(top_srcdir) $(top_builddir)

noop:

DISTCLEANFILES = \
    $(top_builddir)/pigeonhole-version.h \
	$(top_builddir)/run-test.sh

# Testsuite tests (FIXME: ugly)

TESTSUITE_BIN = $(top_builddir)/src/testsuite/testsuite $(TESTSUITE_OPTIONS)

TEST_BIN = $(RUN_TEST) $(TESTSUITE_BIN)

if BUILD_UNFINISHED
test_unfinished =
else
test_unfinished =
endif

test_cases = \
	tests/testsuite.svtest \
	tests/control-if.svtest \
	tests/control-stop.svtest \
	tests/test-allof.svtest \
	tests/test-anyof.svtest \
	tests/test-exists.svtest \
	tests/test-header.svtest \
	tests/test-address.svtest \
	tests/test-size.svtest \
	tests/compile/compile.svtest \
	tests/compile/errors.svtest \
	tests/compile/warnings.svtest \
	tests/compile/recover.svtest \
	tests/execute/errors.svtest \
	tests/execute/errors-cpu-limit.svtest \
	tests/execute/actions.svtest \
	tests/execute/smtp.svtest \
	tests/execute/mailstore.svtest \
	tests/execute/address-normalize.svtest \
	tests/execute/examples.svtest \
	tests/lexer.svtest \
	tests/comparators/i-octet.svtest \
	tests/comparators/i-ascii-casemap.svtest \
	tests/match-types/is.svtest \
	tests/match-types/contains.svtest \
	tests/match-types/matches.svtest \
	tests/multiscript/basic.svtest \
	tests/multiscript/conflicts.svtest \
	tests/extensions/encoded-character.svtest \
	tests/extensions/envelope.svtest \
	tests/extensions/variables/basic.svtest \
	tests/extensions/variables/match.svtest \
	tests/extensions/variables/modifiers.svtest \
	tests/extensions/variables/quoting.svtest \
	tests/extensions/variables/string.svtest \
	tests/extensions/variables/errors.svtest \
	tests/extensions/variables/regex.svtest \
	tests/extensions/include/errors.svtest \
	tests/extensions/include/variables.svtest \
	tests/extensions/include/once.svtest \
	tests/extensions/include/twice.svtest \
	tests/extensions/include/optional.svtest \
	tests/extensions/include/rfc.svtest \
	tests/extensions/include/execute.svtest \
	tests/extensions/imap4flags/basic.svtest \
	tests/extensions/imap4flags/hasflag.svtest \
	tests/extensions/imap4flags/execute.svtest \
	tests/extensions/imap4flags/multiscript.svtest \
	tests/extensions/imap4flags/flagstring.svtest \
	tests/extensions/imap4flags/flagstore.svtest \
	tests/extensions/body/basic.svtest \
	tests/extensions/body/errors.svtest \
	tests/extensions/body/raw.svtest \
	tests/extensions/body/content.svtest \
	tests/extensions/body/text.svtest \
	tests/extensions/body/match-values.svtest \
	tests/extensions/regex/basic.svtest \
	tests/extensions/regex/match-values.svtest \
	tests/extensions/regex/errors.svtest \
	tests/extensions/reject/execute.svtest \
	tests/extensions/reject/smtp.svtest \
	tests/extensions/relational/basic.svtest \
	tests/extensions/relational/rfc.svtest \
	tests/extensions/relational/errors.svtest \
	tests/extensions/relational/comparators.svtest \
	tests/extensions/subaddress/basic.svtest \
	tests/extensions/subaddress/rfc.svtest \
	tests/extensions/subaddress/config.svtest \
	tests/extensions/vacation/errors.svtest \
	tests/extensions/vacation/execute.svtest \
	tests/extensions/vacation/message.svtest \
	tests/extensions/vacation/smtp.svtest \
	tests/extensions/vacation/utf-8.svtest \
	tests/extensions/vacation/reply.svtest \
	tests/extensions/enotify/basic.svtest \
	tests/extensions/enotify/encodeurl.svtest \
	tests/extensions/enotify/valid_notify_method.svtest \
	tests/extensions/enotify/notify_method_capability.svtest \
	tests/extensions/enotify/errors.svtest \
	tests/extensions/enotify/execute.svtest \
	tests/extensions/enotify/mailto.svtest \
	tests/extensions/environment/basic.svtest \
	tests/extensions/environment/rfc.svtest \
	tests/extensions/mailbox/errors.svtest \
	tests/extensions/mailbox/execute.svtest \
	tests/extensions/date/basic.svtest \
	tests/extensions/date/date-parts.svtest \
	tests/extensions/date/zones.svtest \
	tests/extensions/index/basic.svtest \
	tests/extensions/index/errors.svtest \
	tests/extensions/spamvirustest/spamtest.svtest \
	tests/extensions/spamvirustest/virustest.svtest \
	tests/extensions/spamvirustest/spamtestplus.svtest \
	tests/extensions/spamvirustest/errors.svtest \
	tests/extensions/ihave/execute.svtest \
	tests/extensions/ihave/errors.svtest \
	tests/extensions/ihave/restrictions.svtest \
	tests/extensions/editheader/addheader.svtest \
	tests/extensions/editheader/deleteheader.svtest \
	tests/extensions/editheader/alternating.svtest \
	tests/extensions/editheader/utf8.svtest \
	tests/extensions/editheader/protected.svtest \
	tests/extensions/editheader/errors.svtest \
	tests/extensions/editheader/execute.svtest \
	tests/extensions/duplicate/errors.svtest \
	tests/extensions/duplicate/execute.svtest \
	tests/extensions/duplicate/execute-vnd.svtest \
	tests/extensions/metadata/execute.svtest \
	tests/extensions/metadata/errors.svtest \
	tests/extensions/mime/errors.svtest \
	tests/extensions/mime/header.svtest \
	tests/extensions/mime/exists.svtest \
	tests/extensions/mime/address.svtest \
	tests/extensions/mime/execute.svtest \
	tests/extensions/mime/content-header.svtest \
	tests/extensions/mime/foreverypart.svtest \
	tests/extensions/mime/extracttext.svtest \
	tests/extensions/mime/calendar-example.svtest \
	tests/extensions/special-use/errors.svtest \
	tests/extensions/special-use/execute.svtest \
	tests/extensions/vnd.dovecot/debug/execute.svtest \
	tests/extensions/vnd.dovecot/environment/basic.svtest \
	tests/extensions/vnd.dovecot/environment/variables.svtest \
	tests/extensions/vnd.dovecot/report/errors.svtest \
	tests/extensions/vnd.dovecot/report/execute.svtest \
	tests/deprecated/notify/basic.svtest \
	tests/deprecated/notify/mailto.svtest \
	tests/deprecated/notify/errors.svtest \
	tests/deprecated/notify/execute.svtest \
	tests/deprecated/notify/denotify.svtest \
	tests/deprecated/imapflags/execute.svtest \
	tests/deprecated/imapflags/errors.svtest \
	$(test_unfinished)

$(test_cases):
	@$(TEST_BIN) $(top_srcdir)/$@

failure_test_cases = \
	tests/failures/fuzz1.svtest \
	tests/failures/fuzz2.svtest \
	tests/failures/fuzz3.svtest \
	tests/failures/mailbox-bad-utf8.svtest

$(failure_test_cases):
	@$(TEST_BIN) -F $(top_srcdir)/$@

TEST_EXTPROGRAMS_BIN = NOCHILDREN=yes $(TEST_BIN) \
	-P src/plugins/sieve-extprograms/.libs/sieve_extprograms

extprograms_test_cases = \
	tests/plugins/extprograms/errors.svtest \
	tests/plugins/extprograms/pipe/command.svtest \
	tests/plugins/extprograms/pipe/errors.svtest \
	tests/plugins/extprograms/pipe/execute.svtest \
	tests/plugins/extprograms/filter/command.svtest \
	tests/plugins/extprograms/filter/errors.svtest \
	tests/plugins/extprograms/filter/execute.svtest \
	tests/plugins/extprograms/execute/command.svtest \
	tests/plugins/extprograms/execute/errors.svtest \
	tests/plugins/extprograms/execute/execute.svtest

$(extprograms_test_cases):
	@$(TEST_EXTPROGRAMS_BIN) 	$(top_srcdir)/$@

.PHONY: test test-plugins $(test_cases) $(failure_test_cases) $(extprograms_test_cases)
test: all-am $(test_cases) $(failure_test_cases)
test-plugins: all-am $(extprograms_test_cases)

check: check-am test