Skip to content

Commit

Permalink
mantle/kola: fix scope on denylisted variable
Browse files Browse the repository at this point in the history
This variable should have been scoped inside the loop. Outside the loop
the `true` value can carry forward and get applied to tests that
actually aren't denylisted.

Fixes ac9bd49.
  • Loading branch information
dustymabe committed Jun 16, 2023
1 parent ac9bd49 commit 1981a4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mantle/kola/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,10 @@ func filterTests(tests map[string]*register.Test, patterns []string, pltfrm stri
}

func filterDenylistedTests(tests map[string]*register.Test) (map[string]*register.Test, error) {
var denylisted bool
r := make(map[string]*register.Test)
for name, t := range tests {
// Drop anything which is denylisted directly or by pattern
denylisted := false
// Detect anything which is denylisted directly or by pattern
for _, bl := range DenylistedTests {
nameMatch, err := filepath.Match(bl, t.Name)
if err != nil {
Expand Down

0 comments on commit 1981a4f

Please sign in to comment.