internal/system: optional op check parallelism
All checks were successful
Test / Create distribution (push) Successful in 40s
Test / Sandbox (push) Successful in 2m46s
Test / Sandbox (race detector) (push) Successful in 4m46s
Test / Hpkg (push) Successful in 5m17s
Test / Hakurei (push) Successful in 5m32s
Test / Hakurei (race detector) (push) Successful in 6m47s
Test / Flake checks (push) Successful in 1m33s
All checks were successful
Test / Create distribution (push) Successful in 40s
Test / Sandbox (push) Successful in 2m46s
Test / Sandbox (race detector) (push) Successful in 4m46s
Test / Hpkg (push) Successful in 5m17s
Test / Hakurei (push) Successful in 5m32s
Test / Hakurei (race detector) (push) Successful in 6m47s
Test / Flake checks (push) Successful in 1m33s
The PipeWire Op check cannot be made parallel due to the OS interaction. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user