From 1b17ccda914de78a88e1edbb42ce70d963d4b5a2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 7 Dec 2025 17:31:10 +0900 Subject: internal/system: optional op check parallelism The PipeWire Op check cannot be made parallel due to the OS interaction. Signed-off-by: Ophestra --- internal/system/dispatcher_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'internal/system/dispatcher_test.go') diff --git a/internal/system/dispatcher_test.go b/internal/system/dispatcher_test.go index 85bd45bf..ed162171 100644 --- a/internal/system/dispatcher_test.go +++ b/internal/system/dispatcher_test.go @@ -36,17 +36,26 @@ type opBehaviourTestCase struct { wantErrRevert error } -func checkOpBehaviour(t *testing.T, testCases []opBehaviourTestCase) { +const ( + // checkNoParallel causes checkOpBehaviour to skip setting tests as parallel. + checkNoParallel = 1 << iota +) + +func checkOpBehaviour(t *testing.T, flags int, testCases []opBehaviourTestCase) { t.Helper() t.Run("behaviour", func(t *testing.T) { t.Helper() - t.Parallel() + if flags&checkNoParallel == 0 { + t.Parallel() + } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { t.Helper() - t.Parallel() + if flags&checkNoParallel == 0 { + t.Parallel() + } var ec *Criteria if tc.ec != 0xff { -- cgit v1.3.1