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

@@ -8,7 +8,7 @@ import pytest
from xdist.remote import Producer
from xdist.report import report_collection_diff
from xdist.workermanage import parse_spec_config
from xdist.workermanage import parse_tx_spec_config
from xdist.workermanage import WorkerController
@@ -91,7 +91,7 @@ class LoadScopeScheduling:
"""
def __init__(self, config: pytest.Config, log: Producer | None = None) -> None:
self.numnodes = len(parse_spec_config(config))
self.numnodes = len(parse_tx_spec_config(config))
self.collection: list[str] | None = None
self.workqueue: OrderedDict[str, dict[str, bool]] = OrderedDict()