forked from chrysn/aiocoap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
101 lines (90 loc) · 3.21 KB
/
tox.ini
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
[tox]
; py3.7 runs into aiocoap unrelated trouble in setups on Debian sid, leaving
; this to `setup.py test` for now
envlist = {py37,py38,py39,py310,py311,py312,pypy3}-{noextras,allextras},py311-uvloop,py311-gbulb,py311-uvloop-simpleudp,pypy3-simpleudp
skip_missing_interpreters = true
[testenv]
deps =
coverage
pytest
allowlist_externals = sh
commands =
python -m coverage run --parallel -m aiocoap.cli.defaults
# PyPy coverage is just too slow for many time critical tests, see https://github.com/chrysn/aiocoap/issues/265
#
# We need sh because the command execution is otherwise just 'shelx split
# and then pass to subprocess'-ish, and we need to pass the posargs as
# arguments to sh instead of placing them inside, because otherwise they
# won't be escaped right when there is whitespace in arguments, eg. for
# invocations such as `tox -e py311-uvloop -- --ff -k 'test_big_resource
# and TestServerWS'`
sh -c 'if python3 --version |grep -iq pypy ; then \
python -Xdev -m pytest "$@" ; \
else \
python -Xdev -m coverage run --parallel -m pytest "$@" ; \
fi' arbitrary-name-for-our-script {posargs}
[testenv:{py37,py38,py39,py310,py311,pypy3}-noextras]
description = Running on plain Python
[testenv:{py37,py38,py39,py310,py311,pypy3}-allextras]
description = Running with all extra dependencies installed
extras =
all
setenv =
AIOCOAP_DEFAULTS_EXPECT_ALL=1
; Not running the non-default loops everywhere to save some CI time
;
; While it's perfectly realistic that older Python versions struggle with
; those, that's likely more that loop's fault (or the fault of the test setup)
; than aiocoap's.
[testenv:py311-uvloop]
description = Running on uvloop
deps =
coverage
pytest
uvloop
extras =
all
setenv =
AIOCOAP_TESTS_LOOP=uvloop
[testenv:py311-gbulb]
description = Running on gbulb
deps =
coverage
pytest
gbulb
extras =
all
setenv =
AIOCOAP_TESTS_LOOP=gbulb
; Not running the -simple versions everywhere to save some CI time.
;
; For the CPython part we're using the uvloop runner, because AFAIR there were
; some extra workarounds. uvloop doesn't currently work with pypy, which gives
; us the opportunity there to run it on some Python also without uvloop.
[testenv:py311-uvloop-simpleudp]
description = Running on uvloop with simple* UDP transports
deps =
coverage
pytest
uvloop
extras =
all
; client-/server-transport substitute the default udp6 with the non-udp6
; alternative. that test could just as well be done on the default main loop,
; but AFAIR uvloop required occasional workarounds
setenv =
AIOCOAP_DEFAULTS_EXPECT_ALL=1
AIOCOAP_TESTS_LOOP=uvloop
AIOCOAP_CLIENT_TRANSPORT=oscore:tinydtls:tcpclient:tlsclient:ws:simple6
AIOCOAP_SERVER_TRANSPORT=oscore:tinydtls_server:tinydtls:tcpserver:tcpclient:tlsserver:tlsclient:ws:simplesocketserver
[testenv:pypy3-simpleudp]
description = Running pypy3 with simple UDP transports
deps =
coverage
pytest
extras =
all
setenv =
AIOCOAP_DEFAULTS_EXPECT_ALL=1
AIOCOAP_CLIENT_TRANSPORT=oscore:tinydtls:tcpclient:tlsclient:ws:simple6
AIOCOAP_SERVER_TRANSPORT=oscore:tinydtls_server:tinydtls:tcpserver:tcpclient:tlsserver:tlsclient:ws:simplesocketserver