Lines Matching full:weston

6 """Runs tests with Xvfb or Xorg and Openbox or Weston on Linux and normally on
37 """Exception raised when Weston cannot start."""
104 """Runs an executable within Weston, Xvfb or Xorg on Linux or normally on
114 used. "WAYLAND_DISPLAY" will be set if Weston is used.
149 # a Weston instance. However, it is also required to disable xvfb so
150 # that Weston can run in a pure headless environment.
152 if '--use-weston' in cmd:
154 print('Unable to use Weston with xvfb or Xorg.\n', file=sys.stderr)
157 cmd.remove('--use-weston')
340 # The bundled weston (//third_party/weston) is used by Linux Ozone Wayland
344 # //ui/ozone at all, but still have --use-weston flag set by the
347 # informs about missing weston binary. Thus, to overcome the issue before
348 # a better solution is found, add a check for the "weston" binary here and
349 # run tests without Wayland compositor if the weston binary is not found.
351 if not os.path.isfile("./weston"):
352 print('Weston is not available. Starting without Wayland compositor')
364 # Weston is compiled along with the Ozone/Wayland platform, and is
367 # Weston is used with the following flags:
368 # 1) --backend=headless-backend.so - runs Weston in a headless mode
370 # 2) --idle-time=0 - disables idle timeout, which prevents Weston
371 # to enter idle state. Otherwise, Weston stops to send frame callbacks,
373 # the default time after which Weston enters the idle state).
379 # 5) --config=... - tells Weston to use our custom config.
380 weston_cmd = ['./weston', '--backend=headless-backend.so', '--idle-time=0',
384 if '--weston-use-gl' in cmd:
385 # Runs Weston using hardware acceleration instead of SwiftShader.
387 cmd.remove('--weston-use-gl')
389 if '--weston-debug-logging' in cmd:
390 cmd.remove('--weston-debug-logging')
394 # We use the systemd-notify protocol to detect whether weston has launched
397 # systemd-notify module, weston will send a 'READY=1' message to the socket
399 # See the sd_notify(3) man page and weston's compositor/systemd-notify.c for
413 time.sleep(0.1) # Gives weston some time to start.
421 # The 'READY=1' message is sent as soon as weston loads the
427 # Get the $WAYLAND_DISPLAY set by Weston and pass it to the test
429 # process. That's the reason we have to read it from Weston
433 break # Weston could launch and we found the display.
441 raise _WestonProcessError('Failed to start Weston.')
454 print('Failed to start Weston: %s\n' % str(e), file=sys.stderr)
457 print('Weston fail: %s\n' % str(e), file=sys.stderr)
460 kill(weston_proc, 'weston')
475 return os.path.join(tempfile.gettempdir(), '.xvfb.py-weston-notify.sock')
478 return os.path.join(tempfile.gettempdir(), '.xvfb.py-weston.ini')
481 """Retrieves $WAYLAND_DISPLAY set by Weston.
483 Returns the $WAYLAND_DISPLAY variable from one of weston's subprocesses.
485 Weston updates this variable early in its startup in the main process, but we
487 created. Therefore we must use one of weston's subprocesses, which are all
492 weston_proc_pid: The process of id of the main Weston process.
508 # If display is set, Weston could start successfully and we can use
571 '[command [--no-xvfb or --use_xorg or --use-weston] args...]')