libei/test
Peter Hutterer 9700a47473 test: run pytest with xdist where available
A lot of the protocol tests have enforced timeouts because we need to
wait for the server to do something (or not). Running the protocol tests
with xdist means we can run those in parallel, which on my local box
roughly halves the time required to run all protocol tests.

Of course, this is all terrible. The only way to tell pytest to use
xdist is with `pytest -n <jobcount>`. But -n is only available if xdist
is installed. Dynamically adding commandline options is supposed to
be possible with `pytest_load_initial_conftests` in conftest.py, but
that doesn't actually work unless we're configuring a setuptool plugin.
Which we don't. What would work is `pytest_cmdline_preparse` but that
has been deprecated.

So we work around this by having meson check if xdist is available and
append `-n auto` for us.

In the CI let's be nice and only use the FDI_CI_CONCURRENT number of
jobs rather than hogging everything available. And, continuation from
"all is terrible": pytest complains if you have a hook that's unknown.
So if xdist is not available, you must not have the hook in conftest.py.
Which means we have to do it within an import + ImportError clause.

But yay, now we're saving literally seconds!
2023-03-03 11:27:01 +10:00
..
templates test: drop a bunch of unused imports 2023-02-15 08:20:01 +10:00
buildtest.c Purge libreis from the repo 2023-02-09 11:48:28 +10:00
buildtest.cc Add C++ header guards 2020-09-29 17:30:49 +10:00
conftest.py test: run pytest with xdist where available 2023-03-03 11:27:01 +10:00
eierpecken.c Remove the public API to query the client version number 2023-02-13 13:55:44 +10:00
eierpecken.h Add a sequence number to START_EMULATING 2023-02-09 11:48:29 +10:00
eiproto.py.tmpl proto: split up message length and opcode again 2023-03-03 11:27:01 +10:00
meson.build test: run pytest with xdist where available 2023-03-03 11:27:01 +10:00
test-ei-device.c test: set the minimum bits for our test devices 2023-02-20 15:43:22 +10:00
test-ei-seat.c test: rename the ei AUTOCONNECT behavior to HANDLE_CONNECT 2022-08-01 11:26:32 +10:00
test-ei.c Purge the properties from the protocol 2023-02-09 11:48:29 +10:00
test-eis.c Remove the public API to query the client version number 2023-02-13 13:55:44 +10:00
test-main.c Add SPDX identifiers to all source files 2022-03-03 00:27:36 +00:00
test_oeffis.py Format python files with black 2023-02-01 11:48:53 +10:00
test_protocol.py test: up the timeout for dispatch 2023-03-03 11:27:01 +10:00
unit-tests.c Add SPDX identifiers to all source files 2022-03-03 00:27:36 +00:00