From e0c3d657f7b839e8c4fa0f2f61c83c3ad238d561 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 16 Oct 2026 23:16:38 +0900 Subject: internal/testsuite: get pipewire version This formats into some test data. Signed-off-by: Ophestra --- internal/testsuite/testsuite.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'internal') 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 -- cgit v1.3.1