add proxy gateways with --px arg

Proxy gateways do not run workers, and are meant to be passed with the
`via` attribute to additional gateways.
They are useful for running multiple workers on remote machines.

Example usage:
```
pytest -sv --dist=load --px "id=my_proxy//socket=IP:PORT" --tx "5*popen//via=my_proxy"
```

Proxy gateways do not run workers, anda re meant to be passed
This commit is contained in:
Alon Livne
2025-01-11 17:02:13 +02:00
parent a82981f444
commit a9a303f688
7 changed files with 35 additions and 14 deletions

View File

@@ -139,6 +139,17 @@ def pytest_addoption(parser: pytest.Parser) -> None:
"--tx ssh=user@codespeak.net//chdir=testcache"
),
)
group.addoption(
"--px",
dest="px",
action="append",
default=[],
metavar="xspec",
help=(
"Add a proxy gateway to pass to test execution environments using `via`. Example:\n"
"--px id=my_proxy//socket=192.168.1.102:8888 --tx 5*popen//via=my_proxy"
),
)
group._addoption(
"-d",
action="store_true",