Skip to content

Commit

Permalink
kola: fix requiredTag handling
Browse files Browse the repository at this point in the history
If a test has both required tags and non-required tags, it would still be
activated if the user passed one of the non-required tags. But we want it
to only run if the one that's required was passed.
  • Loading branch information
jlebon committed Sep 19, 2023
1 parent c1aa145 commit fcbd026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mantle/kola/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ func filterTests(tests map[string]*register.Test, patterns []string, pltfrm stri
}

if t.RequiredTag != "" && // if the test has a required tag...
!tagMatch && // and that tag was not provided by the user...
!HasString(t.RequiredTag, positiveTags) && // and that tag was not provided by the user...
(!userTypedPattern || !nameMatch) { // and the user didn't request it by name...
continue // then skip it
}
Expand Down

0 comments on commit fcbd026

Please sign in to comment.