Skip to content

Commit 4cfb766

Browse files
committed
Use -m instead of -k to filter markers
-k uses substring match, so -k Sable matched ErgoUtf8NickDisabledTestCase
1 parent e0b4aec commit 4cfb766

File tree

1 file changed

+102
-39
lines changed

1 file changed

+102
-39
lines changed

Makefile

+102-39
Original file line numberDiff line numberDiff line change
@@ -4,110 +4,159 @@ PYTEST ?= python3 -m pytest
44
# pytest-xdist is installed)
55
PYTEST_ARGS ?=
66

7+
# Will be appended at the end of the -m argument to pytest
8+
EXTRA_MARKERS ?=
9+
710
# Will be appended at the end of the -k argument to pytest
811
EXTRA_SELECTORS ?=
912

10-
BAHAMUT_SELECTORS := \
13+
BAHAMUT_MARKERS := \
1114
not implementation-specific \
1215
and not deprecated \
1316
and not strict \
1417
and not IRCv3 \
18+
$(EXTRA_MARKERS)
19+
BAHAMUT_SELECTORS := \
20+
(foo or not foo) \
1521
$(EXTRA_SELECTORS)
1622

17-
CHARYBDIS_SELECTORS := \
23+
CHARYBDIS_MARKERS := \
1824
not implementation-specific \
1925
and not deprecated \
2026
and not strict \
27+
$(EXTRA_MARKERS)
28+
CHARYBDIS_SELECTORS := \
29+
(foo or not foo) \
2130
$(EXTRA_SELECTORS)
2231

23-
ERGO_SELECTORS := \
32+
ERGO_MARKERS := \
2433
(Ergo or not implementation-specific) \
2534
and not deprecated \
35+
$(EXTRA_MARKERS)
36+
ERGO_SELECTORS := \
37+
(foo or not foo) \
2638
$(EXTRA_SELECTORS)
2739

28-
HYBRID_SELECTORS := \
40+
HYBRID_MARKERS := \
2941
not implementation-specific \
3042
and not deprecated \
43+
$(EXTRA_MARKERS)
44+
HYBRID_SELECTORS := \
45+
(foo or not foo) \
3146
$(EXTRA_SELECTORS)
3247

33-
INSPIRCD_SELECTORS := \
48+
INSPIRCD_MARKERS := \
3449
not implementation-specific \
3550
and not deprecated \
3651
and not strict \
52+
$(EXTRA_MARKERS)
53+
INSPIRCD_SELECTORS := \
54+
(foo or not foo) \
3755
$(EXTRA_SELECTORS)
3856

39-
IRCU2_SELECTORS := \
57+
IRCU2_MARKERS := \
4058
not implementation-specific \
4159
and not deprecated \
4260
and not strict \
61+
and not IRCv3 \
62+
$(EXTRA_MARKERS)
63+
IRCU2_SELECTORS := \
64+
(foo or not foo) \
4365
$(EXTRA_SELECTORS)
4466

45-
NEFARIOUS_SELECTORS := \
67+
NEFARIOUS_MARKERS := \
4668
not implementation-specific \
4769
and not deprecated \
4870
and not strict \
71+
$(EXTRA_MARKERS)
72+
NEFARIOUS_SELECTORS := \
73+
(foo or not foo) \
4974
$(EXTRA_SELECTORS)
5075

51-
SNIRCD_SELECTORS := \
76+
SNIRCD_MARKERS := \
5277
not implementation-specific \
5378
and not deprecated \
5479
and not strict \
80+
and not IRCv3 \
81+
$(EXTRA_MARKERS)
82+
SNIRCD_SELECTORS := \
83+
(foo or not foo) \
5584
$(EXTRA_SELECTORS)
5685

57-
IRC2_SELECTORS := \
86+
IRC2_MARKERS := \
5887
not implementation-specific \
5988
and not deprecated \
6089
and not strict \
90+
and not IRCv3 \
91+
$(EXTRA_MARKERS)
92+
IRC2_SELECTORS := \
93+
(foo or not foo) \
6194
$(EXTRA_SELECTORS)
6295

63-
MAMMON_SELECTORS := \
96+
MAMMON_MARKERS := \
6497
not implementation-specific \
6598
and not deprecated \
6699
and not strict \
100+
$(EXTRA_MARKERS)
101+
MAMMON_SELECTORS := \
102+
(foo or not foo) \
67103
$(EXTRA_SELECTORS)
68104

69-
NGIRCD_SELECTORS := \
105+
NGIRCD_MARKERS := \
70106
not implementation-specific \
71107
and not deprecated \
72108
and not strict \
109+
$(EXTRA_MARKERS)
110+
NGIRCD_SELECTORS := \
111+
(foo or not foo) \
73112
$(EXTRA_SELECTORS)
74113

75-
PLEXUS4_SELECTORS := \
114+
PLEXUS4_MARKERS := \
76115
not implementation-specific \
77116
and not deprecated \
117+
$(EXTRA_MARKERS)
118+
PLEXUS4_SELECTORS := \
119+
(foo or not foo) \
78120
$(EXTRA_SELECTORS)
79121

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)
83125
LIMNORIA_SELECTORS := \
84126
(foo or not foo) \
85127
$(EXTRA_SELECTORS)
86128

87129
# 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 := \
89131
(Sable or not implementation-specific) \
90132
and not deprecated \
91133
and not strict \
92134
and not arbitrary_client_tags \
93135
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 \
95139
$(EXTRA_SELECTORS)
96140

97-
SOLANUM_SELECTORS := \
141+
SOLANUM_MARKERS := \
98142
not implementation-specific \
99143
and not deprecated \
100144
and not strict \
145+
$(EXTRA_MARKERS)
146+
SOLANUM_SELECTORS := \
147+
(foo or not foo) \
101148
$(EXTRA_SELECTORS)
102149

103-
# Same as Limnoria
150+
SOPEL_MARKERS := \
151+
not implementation-specific \
152+
$(EXTRA_MARKERS)
104153
SOPEL_SELECTORS := \
105154
(foo or not foo) \
106155
$(EXTRA_SELECTORS)
107156

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)
111160
THELOUNGE_SELECTORS := \
112161
(foo or not foo) \
113162
$(EXTRA_SELECTORS)
@@ -116,13 +165,16 @@ THELOUNGE_SELECTORS := \
116165
# Tests marked with react_tag can't pass because Unreal blocks +draft/react https://github.com/unrealircd/unrealircd/pull/149
117166
# Tests marked with private_chathistory can't pass because Unreal does not implement CHATHISTORY for DMs
118167

119-
UNREALIRCD_SELECTORS := \
168+
UNREALIRCD_MARKERS := \
120169
not implementation-specific \
121170
and not deprecated \
122171
and not strict \
123172
and not arbitrary_client_tags \
124173
and not react_tag \
125174
and not private_chathistory \
175+
$(EXTRA_MARKERS)
176+
UNREALIRCD_SELECTORS := \
177+
(foo or not foo) \
126178
$(EXTRA_SELECTORS)
127179

128180
.PHONY: all flakes bahamut charybdis ergo inspircd ircu2 snircd irc2 mammon nefarious limnoria sable sopel solanum unrealircd
@@ -138,150 +190,161 @@ bahamut:
138190
-m 'not services' \
139191
-n 4 \
140192
-vv -s \
193+
-m 'not services and $(BAHAMUT_MARKERS)'
141194
-k '$(BAHAMUT_SELECTORS)'
142195

143196
bahamut-atheme:
144197
$(PYTEST) $(PYTEST_ARGS) \
145198
--controller=irctest.controllers.bahamut \
146199
--services-controller=irctest.controllers.atheme_services \
147-
-m 'services' \
200+
-m 'services and $(BAHAMUT_MARKERS)' \
148201
-k '$(BAHAMUT_SELECTORS)'
149202

150203
bahamut-anope:
151204
$(PYTEST) $(PYTEST_ARGS) \
152205
--controller=irctest.controllers.bahamut \
153206
--services-controller=irctest.controllers.anope_services \
154-
-m 'services' \
207+
-m 'services and $(BAHAMUT_MARKERS)' \
155208
-k '$(BAHAMUT_SELECTORS)'
156209

157210
charybdis:
158211
$(PYTEST) $(PYTEST_ARGS) \
159212
--controller=irctest.controllers.charybdis \
160213
--services-controller=irctest.controllers.atheme_services \
214+
-m '$(CHARYBDIS_MARKERS)'
161215
-k '$(CHARYBDIS_SELECTORS)'
162216

163217
ergo:
164218
$(PYTEST) $(PYTEST_ARGS) \
165219
--controller irctest.controllers.ergo \
220+
-m '$(ERGO_MARKERS)'
166221
-k "$(ERGO_SELECTORS)"
167222

168223
hybrid:
169224
$(PYTEST) $(PYTEST_ARGS) \
170225
--controller irctest.controllers.hybrid \
171226
--services-controller=irctest.controllers.anope_services \
227+
-m '$(HYBRID_MARKERS)'
172228
-k "$(HYBRID_SELECTORS)"
173229

174230
inspircd:
175231
$(PYTEST) $(PYTEST_ARGS) \
176232
--controller=irctest.controllers.inspircd \
177-
-m 'not services' \
233+
-m 'not services and $(INSPIRCD_MARKERS)' \
178234
-k '$(INSPIRCD_SELECTORS)'
179235

180236
inspircd-atheme:
181237
$(PYTEST) $(PYTEST_ARGS) \
182238
--controller=irctest.controllers.inspircd \
183239
--services-controller=irctest.controllers.atheme_services \
184-
-m 'services' \
240+
-m 'services and $(INSPIRCD_MARKERS)' \
185241
-k '$(INSPIRCD_SELECTORS)'
186242

187243
inspircd-anope:
188244
$(PYTEST) $(PYTEST_ARGS) \
189245
--controller=irctest.controllers.inspircd \
190246
--services-controller=irctest.controllers.anope_services \
191-
-m 'services' \
247+
-m 'services and $(INSPIRCD_MARKERS)' \
192248
-k '$(INSPIRCD_SELECTORS)'
193249

194250
ircu2:
195251
$(PYTEST) $(PYTEST_ARGS) \
196252
--controller=irctest.controllers.ircu2 \
197-
-m 'not services and not IRCv3' \
253+
-m 'not services and $(IRCU2_MARKERS)' \
198254
-n 4 \
199255
-k '$(IRCU2_SELECTORS)'
200256

201257
nefarious:
202258
$(PYTEST) $(PYTEST_ARGS) \
203259
--controller=irctest.controllers.nefarious \
204-
-m 'not services' \
260+
-m 'not services and $(NEFARIOUS_MARKERS)' \
205261
-n 4 \
206262
-k '$(NEFARIOUS_SELECTORS)'
207263

208264
snircd:
209265
$(PYTEST) $(PYTEST_ARGS) \
210266
--controller=irctest.controllers.snircd \
211-
-m 'not services and not IRCv3' \
267+
-m 'not services and $(SNIRCD_MARKERS)' \
212268
-n 4 \
213269
-k '$(SNIRCD_SELECTORS)'
214270

215271
irc2:
216272
$(PYTEST) $(PYTEST_ARGS) \
217273
--controller=irctest.controllers.irc2 \
218-
-m 'not services and not IRCv3' \
274+
-m 'not services and $(IRCU2_MARKERS)' \
219275
-n 4 \
220276
-k '$(IRC2_SELECTORS)'
221277

222278
limnoria:
223279
$(PYTEST) $(PYTEST_ARGS) \
224280
--controller=irctest.controllers.limnoria \
281+
-m '$(LIMNORIA_MARKERS)' \
225282
-k '$(LIMNORIA_SELECTORS)'
226283

227284
mammon:
228285
$(PYTEST) $(PYTEST_ARGS) \
229286
--controller=irctest.controllers.mammon \
287+
-m '$(MAMMON_MARKERS)' \
230288
-k '$(MAMMON_SELECTORS)'
231289

232290
plexus4:
233291
$(PYTEST) $(PYTEST_ARGS) \
234292
--controller irctest.controllers.plexus4 \
235293
--services-controller=irctest.controllers.anope_services \
294+
-m '$(PLEXUS4_MARKERS)' \
236295
-k "$(PLEXUS4_SELECTORS)"
237296

238297
ngircd:
239298
$(PYTEST) $(PYTEST_ARGS) \
240299
--controller irctest.controllers.ngircd \
241-
-m 'not services' \
300+
-m 'not services and $(NGIRCD_MARKERS)' \
242301
-n 4 \
243302
-k "$(NGIRCD_SELECTORS)"
244303

245304
ngircd-anope:
246305
$(PYTEST) $(PYTEST_ARGS) \
247306
--controller irctest.controllers.ngircd \
248307
--services-controller=irctest.controllers.anope_services \
249-
-m 'services' \
308+
-m 'services and $(NGIRCD_MARKERS)' \
250309
-k "$(NGIRCD_SELECTORS)"
251310

252311
ngircd-atheme:
253312
$(PYTEST) $(PYTEST_ARGS) \
254313
--controller irctest.controllers.ngircd \
255314
--services-controller=irctest.controllers.atheme_services \
256-
-m 'services' \
315+
-m 'services and $(NGIRCD_MARKERS)' \
257316
-k "$(NGIRCD_SELECTORS)"
258317

259318
sable:
260319
$(PYTEST) $(PYTEST_ARGS) \
261320
--controller=irctest.controllers.sable \
321+
-m '$(SABLE_MARKERS)' \
262322
-n 20 \
263323
-k '$(SABLE_SELECTORS)'
264324

265325
solanum:
266326
$(PYTEST) $(PYTEST_ARGS) \
267327
--controller=irctest.controllers.solanum \
268328
--services-controller=irctest.controllers.atheme_services \
329+
-m '$(SOLANUM_MARKERS)' \
269330
-k '$(SOLANUM_SELECTORS)'
270331

271332
sopel:
272333
$(PYTEST) $(PYTEST_ARGS) \
273334
--controller=irctest.controllers.sopel \
335+
-m '$(SOPEL_MARKERS)' \
274336
-k '$(SOPEL_SELECTORS)'
275337

276338
thelounge:
277339
$(PYTEST) $(PYTEST_ARGS) \
278340
--controller=irctest.controllers.thelounge \
341+
-m '$(THELOUNGE_MARKERS)' \
279342
-k '$(THELOUNGE_SELECTORS)'
280343

281344
unrealircd:
282345
$(PYTEST) $(PYTEST_ARGS) \
283346
--controller=irctest.controllers.unrealircd \
284-
-m 'not services' \
347+
-m 'not services and $(UNREALIRCD_MARKERS)' \
285348
-k '$(UNREALIRCD_SELECTORS)'
286349

287350
unrealircd-5: unrealircd
@@ -290,19 +353,19 @@ unrealircd-atheme:
290353
$(PYTEST) $(PYTEST_ARGS) \
291354
--controller=irctest.controllers.unrealircd \
292355
--services-controller=irctest.controllers.atheme_services \
293-
-m 'services' \
356+
-m 'services and $(UNREALIRCD_MARKERS)' \
294357
-k '$(UNREALIRCD_SELECTORS)'
295358

296359
unrealircd-anope:
297360
$(PYTEST) $(PYTEST_ARGS) \
298361
--controller=irctest.controllers.unrealircd \
299362
--services-controller=irctest.controllers.anope_services \
300-
-m 'services' \
363+
-m 'services and $(UNREALIRCD_MARKERS)' \
301364
-k '$(UNREALIRCD_SELECTORS)'
302365

303366
unrealircd-dlk:
304367
pifpaf run mysql -- $(PYTEST) $(PYTEST_ARGS) \
305368
--controller=irctest.controllers.unrealircd \
306369
--services-controller=irctest.controllers.dlk_services \
307-
-m 'services' \
370+
-m 'services and $(UNREALIRCD_MARKERS)' \
308371
-k '$(UNREALIRCD_SELECTORS)'

0 commit comments

Comments
 (0)