build: add pytest targets

It enables running pytests in cmake jobs, regardless of underlying build
tool choice (= makes it work with ninja.)

Also:

- drop pytest logic launching `make` and exiting in case of failure.
  Maybe there is a better way and keep this functionality somehow, bind
  it to a command-line option? make it fail softly?

- GHA/linux: invoke pytest via the build, not directly.

- autotools: add missing dummy runtests targets when cross-compiling.

Closes #15034
This commit is contained in:
Viktor Szakats 2024-09-24 01:53:27 +02:00
parent ed766751cc
commit d82f9f965c
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
7 changed files with 49 additions and 17 deletions

View file

@ -73,8 +73,6 @@ def env(pytestconfig) -> Env:
pytest.skip(env.incomplete_reason())
env.setup()
if not env.make_clients():
pytest.exit(1)
return env
@pytest.fixture(scope="package", autouse=True)