I'm trying to run remote test (very simple hello world test) execution using pytest-xdist. I'm trying to do it from Windows 10 cmd (not admin), the remote machine: Linux Centos 7.9
Tried to run tests locally - no problem.
The remote machine is reachable by ssh (using mingw)
This is how I run:
C:\\Python399\\Scripts\\pytest.exe -d --rsyncdir D:\\my_temp\\remote_test --tx ssh=-FD:\\my_temp\\remote_test\\ssh_config myvmmachine//python=/usr/bin/python3.6//chdir=~/my_py_test pytest_test.py
D:\my_temp\remote_test\ssh_config:
Host myvmmachine
HostName 127.0.0.1
User mydev
Port 33556
LogLevel DEBUG3
IdentityFile ~/.ssh/my_rsa
After run I have following error:
D:\my_temp\remote_test>C:\\Python399\\Scripts\\pytest.exe -d --rsyncdir D:\\my_temp\\remote_test --tx ssh=-FD:\\my_temp\\remote_test\\ssh_config myvmmachine//python=/usr/bin/python3.6//chdir=~/my_py_test pytest_test.py
================================================= test session starts =================================================
platform win32 -- Python 3.9.9, pytest-8.0.2, pluggy-1.4.0
rootdir: D:\my_temp\remote_test
plugins: anyio-4.3.0, xdist-3.5.0
created: 1/1 workerPseudo-terminal will not be allocated because stdin is not a terminal.
ssh: Could not resolve hostname python -c "import sys;exec(eval(sys.stdin.readline()))": No such host is known.
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "c:\Python399\lib\site-packages\_pytest\main.py", line 271, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "c:\Python399\lib\site-packages\pluggy\_hooks.py", line 501, in __call__
INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR> File "c:\Python399\lib\site-packages\pluggy\_manager.py", line 119, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "c:\Python399\lib\site-packages\pluggy\_callers.py", line 138, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "c:\Python399\lib\site-packages\pluggy\_callers.py", line 121, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "c:\Python399\lib\site-packages\_pytest\logging.py", line 775, in pytest_sessionstart
INTERNALERROR> return (yield)
INTERNALERROR> File "c:\Python399\lib\site-packages\pluggy\_callers.py", line 102, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "c:\Python399\lib\site-packages\xdist\dsession.py", line 83, in pytest_sessionstart
INTERNALERROR> nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR> File "c:\Python399\lib\site-packages\xdist\workermanage.py", line 68, in setup_nodes
INTERNALERROR> return [self.setup_node(spec, putevent) for spec in self.specs]
INTERNALERROR> File "c:\Python399\lib\site-packages\xdist\workermanage.py", line 68, in <listcomp>
INTERNALERROR> return [self.setup_node(spec, putevent) for spec in self.specs]
INTERNALERROR> File "c:\Python399\lib\site-packages\xdist\workermanage.py", line 71, in setup_node
INTERNALERROR> gw = self.group.makegateway(spec)
INTERNALERROR> File "c:\Python399\lib\site-packages\execnet\multi.py", line 133, in makegateway
INTERNALERROR> gw = gateway_bootstrap.bootstrap(io, spec)
INTERNALERROR> File "c:\Python399\lib\site-packages\execnet\gateway_bootstrap.py", line 102, in bootstrap
INTERNALERROR> bootstrap_exec(io, spec)
INTERNALERROR> File "c:\Python399\lib\site-packages\execnet\gateway_bootstrap.py", line 40, in bootstrap_exec
INTERNALERROR> sendexec(
INTERNALERROR> File "c:\Python399\lib\site-packages\execnet\gateway_bootstrap.py", line 78, in sendexec
INTERNALERROR> io.write((repr(source) + "\n").encode("utf-8"))
INTERNALERROR> File "c:\Python399\lib\site-packages\execnet\gateway_base.py", line 483, in write
INTERNALERROR> self._write(data)
INTERNALERROR> BrokenPipeError: [Errno 32] Broken pipe
On the remote machine sudo systemctl status sshd -l shows there was no connection attempt
Could anybody help?