diff options
| -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 |
