wmtest

package
v0.5.3 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: 13 Imported by: 0 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 wmtest runs a headless lys-wm in a private runtime directory for tests: its real parser, its real reload and its real Wayland globals, never the desktop session's.

Index

Constants

View Source
const Bound = 60 * time.Second

Bound limits one command run against lys-wm, and how long lys-wm gets to stop before it is killed.

Variables

This section is empty.

Functions

func Need

func Need(t *testing.T)

Need skips t outside `just test`, which sets LYS_SETTINGS_HEADLESS away from the desktop session, and puts lys-wm and lys-wmctl, built from this source tree, first on PATH.

func Private

func Private(t *testing.T) (config, runtime string)

Private points HOME, the config home and the runtime directory at a fresh temporary directory and cuts the display and bus variables, so nothing reaches the session; it returns the config home and the runtime directory.

Types

type Session

type Session struct {

	// Path is the config file lys-wm reads.
	Path string
	// Runtime is its runtime directory.
	Runtime string
	// contains filtered or unexported fields
}

Session is a running headless lys-wm.

func Start

func Start(t *testing.T, config string) *Session

Start writes config as lys-wm's config file in a private home and runs a headless lys-wm there until the test ends.

func (*Session) Ctl

func (s *Session) Ctl(args ...string) (string, error)

Ctl runs lys-wmctl against this lys-wm and returns its trimmed output.

func (*Session) Display

func (s *Session) Display()

Display points WAYLAND_DISPLAY at this lys-wm's socket.

func (*Session) Stop

func (s *Session) Stop()

Stop ends lys-wm before the test does.

Jump to

Keyboard shortcuts

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