swaytest

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package swaytest runs a private headless sway for tests, so Wayland clients connect to it instead of the developer's session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Msg

func Msg(t *testing.T, args ...string) []byte

Msg runs swaymsg with args against the sway Start ran for this test (its IPC socket in XDG_RUNTIME_DIR), failing the test when sway refuses the command, and returns its output. A failure reports sway's process and thread states, the CPU time it got while swaymsg waited, the host's load, a backtrace when eu-stack or gdb is on PATH, and its log.

func Start

func Start(t *testing.T, env ...string) *os.Process

Start runs a private headless sway rendering with pixman, env overriding its environment (WLR_RENDERER=vulkan, a render node), and points WAYLAND_DISPLAY and XDG_RUNTIME_DIR at it for the test. It returns once sway has answered an IPC request, so its main loop runs: a listening socket alone is not that, since sway binds its sockets before it loads its config and cursor theme. It gets a private session bus: without one, nixpkgs' wrapper runs it under dbus-run-session, whose process is not sway's. Its log is shown when it fails to start. A host without sway skips the test.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL