@@ -4,110 +4,159 @@ PYTEST ?= python3 -m pytest
4
4
# pytest-xdist is installed)
5
5
PYTEST_ARGS ?=
6
6
7
+ # Will be appended at the end of the -m argument to pytest
8
+ EXTRA_MARKERS ?=
9
+
7
10
# Will be appended at the end of the -k argument to pytest
8
11
EXTRA_SELECTORS ?=
9
12
10
- BAHAMUT_SELECTORS := \
13
+ BAHAMUT_MARKERS := \
11
14
not implementation-specific \
12
15
and not deprecated \
13
16
and not strict \
14
17
and not IRCv3 \
18
+ $(EXTRA_MARKERS )
19
+ BAHAMUT_SELECTORS := \
20
+ (foo or not foo) \
15
21
$(EXTRA_SELECTORS )
16
22
17
- CHARYBDIS_SELECTORS := \
23
+ CHARYBDIS_MARKERS := \
18
24
not implementation-specific \
19
25
and not deprecated \
20
26
and not strict \
27
+ $(EXTRA_MARKERS )
28
+ CHARYBDIS_SELECTORS := \
29
+ (foo or not foo) \
21
30
$(EXTRA_SELECTORS )
22
31
23
- ERGO_SELECTORS := \
32
+ ERGO_MARKERS := \
24
33
(Ergo or not implementation-specific) \
25
34
and not deprecated \
35
+ $(EXTRA_MARKERS )
36
+ ERGO_SELECTORS := \
37
+ (foo or not foo) \
26
38
$(EXTRA_SELECTORS )
27
39
28
- HYBRID_SELECTORS := \
40
+ HYBRID_MARKERS := \
29
41
not implementation-specific \
30
42
and not deprecated \
43
+ $(EXTRA_MARKERS )
44
+ HYBRID_SELECTORS := \
45
+ (foo or not foo) \
31
46
$(EXTRA_SELECTORS )
32
47
33
- INSPIRCD_SELECTORS := \
48
+ INSPIRCD_MARKERS := \
34
49
not implementation-specific \
35
50
and not deprecated \
36
51
and not strict \
52
+ $(EXTRA_MARKERS )
53
+ INSPIRCD_SELECTORS := \
54
+ (foo or not foo) \
37
55
$(EXTRA_SELECTORS )
38
56
39
- IRCU2_SELECTORS := \
57
+ IRCU2_MARKERS := \
40
58
not implementation-specific \
41
59
and not deprecated \
42
60
and not strict \
61
+ and not IRCv3 \
62
+ $(EXTRA_MARKERS )
63
+ IRCU2_SELECTORS := \
64
+ (foo or not foo) \
43
65
$(EXTRA_SELECTORS )
44
66
45
- NEFARIOUS_SELECTORS := \
67
+ NEFARIOUS_MARKERS := \
46
68
not implementation-specific \
47
69
and not deprecated \
48
70
and not strict \
71
+ $(EXTRA_MARKERS )
72
+ NEFARIOUS_SELECTORS := \
73
+ (foo or not foo) \
49
74
$(EXTRA_SELECTORS )
50
75
51
- SNIRCD_SELECTORS := \
76
+ SNIRCD_MARKERS := \
52
77
not implementation-specific \
53
78
and not deprecated \
54
79
and not strict \
80
+ and not IRCv3 \
81
+ $(EXTRA_MARKERS )
82
+ SNIRCD_SELECTORS := \
83
+ (foo or not foo) \
55
84
$(EXTRA_SELECTORS )
56
85
57
- IRC2_SELECTORS := \
86
+ IRC2_MARKERS := \
58
87
not implementation-specific \
59
88
and not deprecated \
60
89
and not strict \
90
+ and not IRCv3 \
91
+ $(EXTRA_MARKERS )
92
+ IRC2_SELECTORS := \
93
+ (foo or not foo) \
61
94
$(EXTRA_SELECTORS )
62
95
63
- MAMMON_SELECTORS := \
96
+ MAMMON_MARKERS := \
64
97
not implementation-specific \
65
98
and not deprecated \
66
99
and not strict \
100
+ $(EXTRA_MARKERS )
101
+ MAMMON_SELECTORS := \
102
+ (foo or not foo) \
67
103
$(EXTRA_SELECTORS )
68
104
69
- NGIRCD_SELECTORS := \
105
+ NGIRCD_MARKERS := \
70
106
not implementation-specific \
71
107
and not deprecated \
72
108
and not strict \
109
+ $(EXTRA_MARKERS )
110
+ NGIRCD_SELECTORS := \
111
+ (foo or not foo) \
73
112
$(EXTRA_SELECTORS )
74
113
75
- PLEXUS4_SELECTORS := \
114
+ PLEXUS4_MARKERS := \
76
115
not implementation-specific \
77
116
and not deprecated \
117
+ $(EXTRA_MARKERS )
118
+ PLEXUS4_SELECTORS := \
119
+ (foo or not foo) \
78
120
$(EXTRA_SELECTORS )
79
121
80
- # Limnoria can actually pass all the test so there is none to exclude.
81
- # `(foo or not foo)` serves as a `true` value so it doesn't break when
82
- # $(EXTRA_SELECTORS) is non-empty
122
+ LIMNORIA_MARKERS := \
123
+ not implementation-specific \
124
+ $( EXTRA_MARKERS )
83
125
LIMNORIA_SELECTORS := \
84
126
(foo or not foo) \
85
127
$(EXTRA_SELECTORS )
86
128
87
129
# Tests marked with arbitrary_client_tags or react_tag can't pass because Sable does not support client tags yet
88
- SABLE_SELECTORS := \
130
+ SABLE_MARKERS := \
89
131
(Sable or not implementation-specific) \
90
132
and not deprecated \
91
133
and not strict \
92
134
and not arbitrary_client_tags \
93
135
and not react_tag \
94
- and not list and not lusers and not time and not info \
136
+ $(EXTRA_MARKERS )
137
+ SABLE_SELECTORS := \
138
+ not list and not lusers and not time and not info \
95
139
$(EXTRA_SELECTORS )
96
140
97
- SOLANUM_SELECTORS := \
141
+ SOLANUM_MARKERS := \
98
142
not implementation-specific \
99
143
and not deprecated \
100
144
and not strict \
145
+ $(EXTRA_MARKERS )
146
+ SOLANUM_SELECTORS := \
147
+ (foo or not foo) \
101
148
$(EXTRA_SELECTORS )
102
149
103
- # Same as Limnoria
150
+ SOPEL_MARKERS := \
151
+ not implementation-specific \
152
+ $(EXTRA_MARKERS )
104
153
SOPEL_SELECTORS := \
105
154
(foo or not foo) \
106
155
$(EXTRA_SELECTORS )
107
156
108
- # TheLounge can actually pass all the test so there is none to exclude.
109
- # `(foo or not foo)` serves as a `true` value so it doesn't break when
110
- # $(EXTRA_SELECTORS) is non-empty
157
+ THELOUNGE_MARKERS := \
158
+ not implementation-specific \
159
+ $( EXTRA_MARKERS )
111
160
THELOUNGE_SELECTORS := \
112
161
(foo or not foo) \
113
162
$(EXTRA_SELECTORS )
@@ -116,13 +165,16 @@ THELOUNGE_SELECTORS := \
116
165
# Tests marked with react_tag can't pass because Unreal blocks +draft/react https://github.com/unrealircd/unrealircd/pull/149
117
166
# Tests marked with private_chathistory can't pass because Unreal does not implement CHATHISTORY for DMs
118
167
119
- UNREALIRCD_SELECTORS := \
168
+ UNREALIRCD_MARKERS := \
120
169
not implementation-specific \
121
170
and not deprecated \
122
171
and not strict \
123
172
and not arbitrary_client_tags \
124
173
and not react_tag \
125
174
and not private_chathistory \
175
+ $(EXTRA_MARKERS )
176
+ UNREALIRCD_SELECTORS := \
177
+ (foo or not foo) \
126
178
$(EXTRA_SELECTORS )
127
179
128
180
.PHONY : all flakes bahamut charybdis ergo inspircd ircu2 snircd irc2 mammon nefarious limnoria sable sopel solanum unrealircd
@@ -138,150 +190,161 @@ bahamut:
138
190
-m ' not services' \
139
191
-n 4 \
140
192
-vv -s \
193
+ -m ' not services and $(BAHAMUT_MARKERS)'
141
194
-k ' $(BAHAMUT_SELECTORS)'
142
195
143
196
bahamut-atheme :
144
197
$(PYTEST ) $(PYTEST_ARGS ) \
145
198
--controller=irctest.controllers.bahamut \
146
199
--services-controller=irctest.controllers.atheme_services \
147
- -m ' services' \
200
+ -m ' services and $(BAHAMUT_MARKERS) ' \
148
201
-k ' $(BAHAMUT_SELECTORS)'
149
202
150
203
bahamut-anope :
151
204
$(PYTEST ) $(PYTEST_ARGS ) \
152
205
--controller=irctest.controllers.bahamut \
153
206
--services-controller=irctest.controllers.anope_services \
154
- -m ' services' \
207
+ -m ' services and $(BAHAMUT_MARKERS) ' \
155
208
-k ' $(BAHAMUT_SELECTORS)'
156
209
157
210
charybdis :
158
211
$(PYTEST ) $(PYTEST_ARGS ) \
159
212
--controller=irctest.controllers.charybdis \
160
213
--services-controller=irctest.controllers.atheme_services \
214
+ -m ' $(CHARYBDIS_MARKERS)'
161
215
-k ' $(CHARYBDIS_SELECTORS)'
162
216
163
217
ergo :
164
218
$(PYTEST ) $(PYTEST_ARGS ) \
165
219
--controller irctest.controllers.ergo \
220
+ -m ' $(ERGO_MARKERS)'
166
221
-k " $( ERGO_SELECTORS) "
167
222
168
223
hybrid :
169
224
$(PYTEST ) $(PYTEST_ARGS ) \
170
225
--controller irctest.controllers.hybrid \
171
226
--services-controller=irctest.controllers.anope_services \
227
+ -m ' $(HYBRID_MARKERS)'
172
228
-k " $( HYBRID_SELECTORS) "
173
229
174
230
inspircd :
175
231
$(PYTEST ) $(PYTEST_ARGS ) \
176
232
--controller=irctest.controllers.inspircd \
177
- -m ' not services' \
233
+ -m ' not services and $(INSPIRCD_MARKERS) ' \
178
234
-k ' $(INSPIRCD_SELECTORS)'
179
235
180
236
inspircd-atheme :
181
237
$(PYTEST ) $(PYTEST_ARGS ) \
182
238
--controller=irctest.controllers.inspircd \
183
239
--services-controller=irctest.controllers.atheme_services \
184
- -m ' services' \
240
+ -m ' services and $(INSPIRCD_MARKERS) ' \
185
241
-k ' $(INSPIRCD_SELECTORS)'
186
242
187
243
inspircd-anope :
188
244
$(PYTEST ) $(PYTEST_ARGS ) \
189
245
--controller=irctest.controllers.inspircd \
190
246
--services-controller=irctest.controllers.anope_services \
191
- -m ' services' \
247
+ -m ' services and $(INSPIRCD_MARKERS) ' \
192
248
-k ' $(INSPIRCD_SELECTORS)'
193
249
194
250
ircu2 :
195
251
$(PYTEST ) $(PYTEST_ARGS ) \
196
252
--controller=irctest.controllers.ircu2 \
197
- -m ' not services and not IRCv3 ' \
253
+ -m ' not services and $(IRCU2_MARKERS) ' \
198
254
-n 4 \
199
255
-k ' $(IRCU2_SELECTORS)'
200
256
201
257
nefarious :
202
258
$(PYTEST ) $(PYTEST_ARGS ) \
203
259
--controller=irctest.controllers.nefarious \
204
- -m ' not services' \
260
+ -m ' not services and $(NEFARIOUS_MARKERS) ' \
205
261
-n 4 \
206
262
-k ' $(NEFARIOUS_SELECTORS)'
207
263
208
264
snircd :
209
265
$(PYTEST ) $(PYTEST_ARGS ) \
210
266
--controller=irctest.controllers.snircd \
211
- -m ' not services and not IRCv3 ' \
267
+ -m ' not services and $(SNIRCD_MARKERS) ' \
212
268
-n 4 \
213
269
-k ' $(SNIRCD_SELECTORS)'
214
270
215
271
irc2 :
216
272
$(PYTEST ) $(PYTEST_ARGS ) \
217
273
--controller=irctest.controllers.irc2 \
218
- -m ' not services and not IRCv3 ' \
274
+ -m ' not services and $(IRCU2_MARKERS) ' \
219
275
-n 4 \
220
276
-k ' $(IRC2_SELECTORS)'
221
277
222
278
limnoria :
223
279
$(PYTEST ) $(PYTEST_ARGS ) \
224
280
--controller=irctest.controllers.limnoria \
281
+ -m ' $(LIMNORIA_MARKERS)' \
225
282
-k ' $(LIMNORIA_SELECTORS)'
226
283
227
284
mammon :
228
285
$(PYTEST ) $(PYTEST_ARGS ) \
229
286
--controller=irctest.controllers.mammon \
287
+ -m ' $(MAMMON_MARKERS)' \
230
288
-k ' $(MAMMON_SELECTORS)'
231
289
232
290
plexus4 :
233
291
$(PYTEST ) $(PYTEST_ARGS ) \
234
292
--controller irctest.controllers.plexus4 \
235
293
--services-controller=irctest.controllers.anope_services \
294
+ -m ' $(PLEXUS4_MARKERS)' \
236
295
-k " $( PLEXUS4_SELECTORS) "
237
296
238
297
ngircd :
239
298
$(PYTEST ) $(PYTEST_ARGS ) \
240
299
--controller irctest.controllers.ngircd \
241
- -m ' not services' \
300
+ -m ' not services and $(NGIRCD_MARKERS) ' \
242
301
-n 4 \
243
302
-k " $( NGIRCD_SELECTORS) "
244
303
245
304
ngircd-anope :
246
305
$(PYTEST ) $(PYTEST_ARGS ) \
247
306
--controller irctest.controllers.ngircd \
248
307
--services-controller=irctest.controllers.anope_services \
249
- -m ' services' \
308
+ -m ' services and $(NGIRCD_MARKERS) ' \
250
309
-k " $( NGIRCD_SELECTORS) "
251
310
252
311
ngircd-atheme :
253
312
$(PYTEST ) $(PYTEST_ARGS ) \
254
313
--controller irctest.controllers.ngircd \
255
314
--services-controller=irctest.controllers.atheme_services \
256
- -m ' services' \
315
+ -m ' services and $(NGIRCD_MARKERS) ' \
257
316
-k " $( NGIRCD_SELECTORS) "
258
317
259
318
sable :
260
319
$(PYTEST ) $(PYTEST_ARGS ) \
261
320
--controller=irctest.controllers.sable \
321
+ -m ' $(SABLE_MARKERS)' \
262
322
-n 20 \
263
323
-k ' $(SABLE_SELECTORS)'
264
324
265
325
solanum :
266
326
$(PYTEST ) $(PYTEST_ARGS ) \
267
327
--controller=irctest.controllers.solanum \
268
328
--services-controller=irctest.controllers.atheme_services \
329
+ -m ' $(SOLANUM_MARKERS)' \
269
330
-k ' $(SOLANUM_SELECTORS)'
270
331
271
332
sopel :
272
333
$(PYTEST ) $(PYTEST_ARGS ) \
273
334
--controller=irctest.controllers.sopel \
335
+ -m ' $(SOPEL_MARKERS)' \
274
336
-k ' $(SOPEL_SELECTORS)'
275
337
276
338
thelounge :
277
339
$(PYTEST ) $(PYTEST_ARGS ) \
278
340
--controller=irctest.controllers.thelounge \
341
+ -m ' $(THELOUNGE_MARKERS)' \
279
342
-k ' $(THELOUNGE_SELECTORS)'
280
343
281
344
unrealircd :
282
345
$(PYTEST ) $(PYTEST_ARGS ) \
283
346
--controller=irctest.controllers.unrealircd \
284
- -m ' not services' \
347
+ -m ' not services and $(UNREALIRCD_MARKERS) ' \
285
348
-k ' $(UNREALIRCD_SELECTORS)'
286
349
287
350
unrealircd-5 : unrealircd
@@ -290,19 +353,19 @@ unrealircd-atheme:
290
353
$(PYTEST ) $(PYTEST_ARGS ) \
291
354
--controller=irctest.controllers.unrealircd \
292
355
--services-controller=irctest.controllers.atheme_services \
293
- -m ' services' \
356
+ -m ' services and $(UNREALIRCD_MARKERS) ' \
294
357
-k ' $(UNREALIRCD_SELECTORS)'
295
358
296
359
unrealircd-anope :
297
360
$(PYTEST ) $(PYTEST_ARGS ) \
298
361
--controller=irctest.controllers.unrealircd \
299
362
--services-controller=irctest.controllers.anope_services \
300
- -m ' services' \
363
+ -m ' services and $(UNREALIRCD_MARKERS) ' \
301
364
-k ' $(UNREALIRCD_SELECTORS)'
302
365
303
366
unrealircd-dlk :
304
367
pifpaf run mysql -- $(PYTEST ) $(PYTEST_ARGS ) \
305
368
--controller=irctest.controllers.unrealircd \
306
369
--services-controller=irctest.controllers.dlk_services \
307
- -m ' services' \
370
+ -m ' services and $(UNREALIRCD_MARKERS) ' \
308
371
-k ' $(UNREALIRCD_SELECTORS)'
0 commit comments