mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix tests.
This commit is contained in:
parent
4ddd45f788
commit
8536af33da
@ -19,6 +19,7 @@
|
|||||||
Docker container instance.
|
Docker container instance.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
import asyncio
|
import asyncio
|
||||||
import shutil
|
import shutil
|
||||||
import psutil
|
import psutil
|
||||||
@ -616,10 +617,11 @@ class DockerVM(BaseNode):
|
|||||||
x11_socket = os.path.join("/tmp/.X11-unix/", "X{}".format(self._display))
|
x11_socket = os.path.join("/tmp/.X11-unix/", "X{}".format(self._display))
|
||||||
await wait_for_file_creation(x11_socket)
|
await wait_for_file_creation(x11_socket)
|
||||||
|
|
||||||
# Start vncconfig for tigervnc clipboard support, connection available only after socket creation.
|
if not hasattr(sys, "_called_from_test") or not sys._called_from_test:
|
||||||
tigervncconfig_path = shutil.which("vncconfig")
|
# Start vncconfig for tigervnc clipboard support, connection available only after socket creation.
|
||||||
if tigervnc_path and tigervncconfig_path:
|
tigervncconfig_path = shutil.which("vncconfig")
|
||||||
self._vncconfig_process = await asyncio.create_subprocess_exec(tigervncconfig_path, "-display", ":{}".format(self._display), "-nowin")
|
if tigervnc_path and tigervncconfig_path:
|
||||||
|
self._vncconfig_process = await asyncio.create_subprocess_exec(tigervncconfig_path, "-display", ":{}".format(self._display), "-nowin")
|
||||||
|
|
||||||
# sometimes the VNC process can crash
|
# sometimes the VNC process can crash
|
||||||
monitor_process(self._vnc_process, self._vnc_callback)
|
monitor_process(self._vnc_process, self._vnc_callback)
|
||||||
|
Loading…
Reference in New Issue
Block a user