mirror of
https://github.com/golang/go
synced 2024-11-21 23:34:42 -07:00
testing: remove matchMutex
Change-Id: Ia5424fbda2c385a9f8b559fb38fcd4e596e905a3
This commit is contained in:
parent
69583738eb
commit
f6856b09da
@ -44,10 +44,6 @@ type simpleMatch []string
|
|||||||
// alternationMatch matches a test name if one of the alternations match.
|
// alternationMatch matches a test name if one of the alternations match.
|
||||||
type alternationMatch []filterMatch
|
type alternationMatch []filterMatch
|
||||||
|
|
||||||
// TODO: fix test_main to avoid race and improve caching, also allowing to
|
|
||||||
// eliminate this Mutex.
|
|
||||||
var matchMutex sync.Mutex
|
|
||||||
|
|
||||||
func allMatcher() *matcher {
|
func allMatcher() *matcher {
|
||||||
return newMatcher(nil, "", "", "")
|
return newMatcher(nil, "", "", "")
|
||||||
}
|
}
|
||||||
@ -90,9 +86,6 @@ func (m *matcher) fullName(c *common, subname string) (name string, ok, partial
|
|||||||
name = m.unique(c.name, rewrite(subname))
|
name = m.unique(c.name, rewrite(subname))
|
||||||
}
|
}
|
||||||
|
|
||||||
matchMutex.Lock()
|
|
||||||
defer matchMutex.Unlock()
|
|
||||||
|
|
||||||
// We check the full array of paths each time to allow for the case that a pattern contains a '/'.
|
// We check the full array of paths each time to allow for the case that a pattern contains a '/'.
|
||||||
elem := strings.Split(name, "/")
|
elem := strings.Split(name, "/")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user