Skip to content

run tests in parallel#28

Merged
tridge merged 3 commits into
ArduPilot:mainfrom
tridge:pr-parallel-test
May 8, 2026
Merged

run tests in parallel#28
tridge merged 3 commits into
ArduPilot:mainfrom
tridge:pr-parallel-test

Conversation

@tridge
Copy link
Copy Markdown
Contributor

@tridge tridge commented May 8, 2026

allows expansion of tests without long waits

tridge and others added 3 commits May 8, 2026 17:13
conftest now derives a worker id from PYTEST_XDIST_WORKER, assigns a
distinct (port1, port2) pair via env vars before importing test_config,
and chdirs each worker into its own tmpdir at session start. udpproxy
and keydb.py both read keys.tdb from cwd, so per-worker cwd is enough
to keep workers' database state isolated. test_config exposes absolute
KEYDB_PY / UDPPROXY_BIN paths so tests still resolve them after chdir.
test_authentication switches all subprocess calls to KEYDB_PY.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the bash logic in run_tests.sh with run_tests.py, which builds
udpproxy and runs pytest twice (connections, then authentication) with
optional -n J for pytest-xdist parallelism. run_tests.sh becomes a thin
shim that activates the venv and execs the Python runner so existing CI
and README invocations keep working. Add pytest-xdist to setup_ci.sh.

The keys.tdb backup/restore dance in the old script is dropped: workers
now use per-worker tmpdirs, so the repo-root keys.tdb is never touched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub-hosted ubuntu-latest runners have 4 vCPUs, and the new test
harness supports pytest-xdist parallelism via run_tests.sh -j N.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tridge tridge merged commit 0973dea into ArduPilot:main May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant