diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-07 17:31:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-07 17:31:10 +0900 |
| commit | 1b17ccda914de78a88e1edbb42ce70d963d4b5a2 (patch) | |
| tree | bc82be23e45591f55b716e0d846e415dca7bac16 /internal/system/dispatcher_test.go | |
| parent | 7c6fc1128b89ebfc22adc52bac1fdb9205e69150 (diff) | |
internal/system: optional op check parallelism
The PipeWire Op check cannot be made parallel due to the OS interaction.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/system/dispatcher_test.go')
| -rw-r--r-- | internal/system/dispatcher_test.go | 15 |
1 files changed, 12 insertions, 3 deletions
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 { |
