mirror of
https://github.com/progval/irctest.git
synced 2025-04-08 00:09:46 +00:00
Move the complex list of selectors from .github/workflows/* to the Makefile
This commit is contained in:
4
.github/workflows/charybdis.yml
vendored
4
.github/workflows/charybdis.yml
vendored
@ -49,7 +49,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
# testQuitErrors is very flaky
|
PATH=~/.local/bin:$PATH make charybdis
|
||||||
# AccountTagTestCase.testInvite fails because https://github.com/solanum-ircd/solanum/issues/166
|
|
||||||
PATH=~/.local/bin:$PATH pytest --controller=irctest.controllers.charybdis -k 'not Ergo and not deprecated and not strict and not testDoubleKickMessages and not testQuitErrors and not (AccountTagTestCase and testInvite)'
|
|
||||||
|
|
||||||
|
@ -51,4 +51,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
PATH=~/go/bin:$PATH pytest --controller=irctest.controllers.ergo -k 'not deprecated'
|
PATH=~/go/bin:$PATH make ergo
|
5
.github/workflows/inspircd.yml
vendored
5
.github/workflows/inspircd.yml
vendored
@ -49,8 +49,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
# testNoticeNonexistentChannel fails because of https://github.com/inspircd/inspircd/issues/1849
|
PATH=~/.local/bin:$PATH make inspircd
|
||||||
# testDirectMessageEcho fails because of https://github.com/inspircd/inspircd/issues/1851
|
|
||||||
# testKeyValidation fails because of https://github.com/inspircd/inspircd/issues/1850
|
|
||||||
PATH=~/.local/bin:$PATH pytest --controller irctest.controllers.inspircd -k 'not Ergo and not deprecated and not strict and not testNoticeNonexistentChannel and not testDirectMessageEcho and not testKeyValidation'
|
|
||||||
|
|
||||||
|
2
.github/workflows/limnoria.yml
vendored
2
.github/workflows/limnoria.yml
vendored
@ -32,6 +32,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
PATH=~/.local/bin:$PATH pytest --controller=irctest.controllers.limnoria
|
PATH=~/.local/bin:$PATH make limnoria
|
||||||
|
|
||||||
|
|
||||||
|
2
.github/workflows/solanum.yml
vendored
2
.github/workflows/solanum.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
PATH=~/.local/bin:$PATH pytest --controller=irctest.controllers.solanum -k 'not Ergo and not deprecated and not strict and not testDoubleKickMessages'
|
PATH=~/.local/bin:$PATH make solanum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
.github/workflows/sopel.yml
vendored
2
.github/workflows/sopel.yml
vendored
@ -32,6 +32,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
PATH=~/.local/bin:$PATH pytest --controller=irctest.controllers.sopel -k "not testPlainNotAvailable"
|
PATH=~/.local/bin:$PATH make sopel
|
||||||
|
|
||||||
|
|
||||||
|
86
Makefile
86
Makefile
@ -1,9 +1,87 @@
|
|||||||
.PHONY: all flakes ergo
|
PYTEST ?= python3 -m pytest
|
||||||
|
|
||||||
all: flakes ergo
|
# Extra arguments to pass to pytest (eg. `-n 4` to run in parallel if
|
||||||
|
# pytest-xdist is installed)
|
||||||
|
PYTEST_ARGS ?=
|
||||||
|
|
||||||
|
# Will be appended at the end of the -k argument to pytest
|
||||||
|
EXTRA_SELECTORS ?=
|
||||||
|
|
||||||
|
# testQuitErrors is very flaky
|
||||||
|
# AccountTagTestCase.testInvite fails because https://github.com/solanum-ircd/solanum/issues/166
|
||||||
|
CHARYBDIS_SELECTORS := \
|
||||||
|
not Ergo \
|
||||||
|
and not deprecated \
|
||||||
|
and not strict \
|
||||||
|
and not testDoubleKickMessages \
|
||||||
|
and not testQuitErrors \
|
||||||
|
and not (AccountTagTestCase and testInvite) \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
ERGO_SELECTORS := \
|
||||||
|
not deprecated \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
# testNoticeNonexistentChannel fails because of https://github.com/inspircd/inspircd/issues/1849
|
||||||
|
# testDirectMessageEcho fails because of https://github.com/inspircd/inspircd/issues/1851
|
||||||
|
# testKeyValidation fails because of https://github.com/inspircd/inspircd/issues/1850
|
||||||
|
INSPIRCD_SELECTORS := \
|
||||||
|
not Ergo \
|
||||||
|
and not deprecated \
|
||||||
|
and not strict \
|
||||||
|
and not testNoticeNonexistentChannel \
|
||||||
|
and not testDirectMessageEcho \
|
||||||
|
and not testKeyValidation \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
MAMMON_SELECTORS := \
|
||||||
|
not Ergo \
|
||||||
|
and not deprecated \
|
||||||
|
and not strict \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
# Limnoria can actually pass all the test so there is none to exclude.
|
||||||
|
# `(foo or not foo)` serves as a `true` value so it doesn't break when
|
||||||
|
# $(EXTRA_SELECTORS) is non-empty
|
||||||
|
LIMNORIA_SELECTORS := \
|
||||||
|
(foo or not foo) \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
SOLANUM_SELECTORS := \
|
||||||
|
not Ergo \
|
||||||
|
and not deprecated \
|
||||||
|
and not strict \
|
||||||
|
and not testDoubleKickMessages \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
SOPEL_SELECTORS := \
|
||||||
|
not testPlainNotAvailable \
|
||||||
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
.PHONY: all flakes ergo charybdis
|
||||||
|
|
||||||
|
all: flakes ergo inspircd limnoria sopel solanum
|
||||||
|
|
||||||
flakes:
|
flakes:
|
||||||
pyflakes3 ./irctest/cases.py ./irctest/client_mock.py ./irctest/controllers/ergo.py irctest/server_tests/*.py
|
pyflakes3 irctest
|
||||||
|
|
||||||
|
charybdis:
|
||||||
|
$(PYTEST) $(PYTEST_ARGS) --controller=irctest.controllers.charybdis -k '$(CHARYBDIS_SELECTORS)'
|
||||||
|
|
||||||
ergo:
|
ergo:
|
||||||
python3 -m pytest -k "not deprecated" --controller irctest.controllers.ergo
|
$(PYTEST) $(PYTEST_ARGS) --controller irctest.controllers.ergo -k "$(ERGO_SELECTORS)"
|
||||||
|
|
||||||
|
inspircd:
|
||||||
|
$(PYTEST) $(PYTEST_ARGS) --controller=irctest.controllers.inspircd -k '$(INSPIRCD_SELECTORS)'
|
||||||
|
|
||||||
|
limnoria:
|
||||||
|
$(PYTEST) $(PYTEST_ARGS) --controller=irctest.controllers.limnoria -k '$(LIMNORIA_SELECTORS)'
|
||||||
|
|
||||||
|
mammon:
|
||||||
|
$(PYTEST) $(PYTEST_ARGS) --controller=irctest.controllers.mammon -k '$(MAMMON_SELECTORS)'
|
||||||
|
|
||||||
|
solanum:
|
||||||
|
$(PYTEST) $(PYTEST_ARGS) --controller=irctest.controllers.solanum -k '$(SOLANUM_SELECTORS)'
|
||||||
|
|
||||||
|
sopel:
|
||||||
|
$(PYTEST) $(PYTEST_ARGS) --controller=irctest.controllers.sopel -k '$(SOPEL_SELECTORS)'
|
||||||
|
Reference in New Issue
Block a user