diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-16 23:16:38 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-17 00:08:17 +0900 |
| commit | e0c3d657f7b839e8c4fa0f2f61c83c3ad238d561 (patch) | |
| tree | abe85e6751a52a70e2a995a347454277356d26c9 | |
| parent | abb58e9a2f0e3b98e218bdc2d04fea5ceb58c3a5 (diff) | |
internal/testsuite: get pipewire version
This formats into some test data.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/testsuite/testsuite.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/internal/testsuite/testsuite.go b/internal/testsuite/testsuite.go index 09c9af0a..7c198bba 100644 --- a/internal/testsuite/testsuite.go +++ b/internal/testsuite/testsuite.go @@ -414,7 +414,16 @@ func TerminateSway(cred *syscall.Credential) { // MustStartPipeWire starts a PipeWire server that is never explicitly // terminated. The test suite is terminated if the PipeWire server terminates. -func MustStartPipeWire(cred *syscall.Credential, dbusEnv string) { +func MustStartPipeWire(cred *syscall.Credential, dbusEnv string) (version string) { + version, _ = MustOutput( + context.Background(), nil, nil, 0, + "pipewire version", + "pipewire", "--version", + ) + _, version, _ = strings.Cut(version, "Compiled with libpipewire ") + _, version, _ = strings.Cut(version, "\nLinked with libpipewire") + version = strings.TrimSpace(version) + // this is never explicitly terminated _, done := MustStartWith( context.Background(), cred, quietServices, []string{ @@ -439,6 +448,15 @@ func MustStartPipeWire(cred *syscall.Credential, dbusEnv string) { "status", ) + Poll(50*time.Millisecond, cred, []string{ + XDGRuntimeEnv, + dbusEnv, + }, + "pw-cli", + "load-module", + "libpipewire-module-null-sink", + ) + _, _done := MustStartWith( context.Background(), cred, quietServices, []string{ XDGRuntimeEnv, @@ -453,6 +471,7 @@ func MustStartPipeWire(cred *syscall.Credential, dbusEnv string) { } log.Fatal("wireplumber terminated unexpectedly") }() + return } // MustScanFor continuously scans the proc filesystem and calls f for each entry |
