...
 
Commits (3)
......@@ -61,6 +61,8 @@ var roachtestOwners = map[Owner]OwnerMetadata{
`unittest`: {},
}
const defaultTag = "default"
type testRegistry struct {
m map[string]*testSpec
// buildVersion is the version of the Cockroach binary that tests will run against.
......@@ -133,6 +135,10 @@ func (r *testRegistry) prepareSpec(spec *testSpec) error {
if _, ok := roachtestOwners[spec.Owner]; !ok {
return fmt.Errorf(`%s: unknown owner [%s]`, spec.Name, spec.Owner)
}
if len(spec.Tags) == 0 {
spec.Tags = []string{defaultTag}
}
spec.Tags = append(spec.Tags, "owner-"+string(spec.Owner))
return nil
}
......@@ -211,8 +217,8 @@ func newFilter(filter []string) *testFilter {
}
if len(tag) == 0 {
tag = []string{"default"}
rawTag = []string{"tag:default"}
tag = []string{defaultTag}
rawTag = []string{"tag:" + defaultTag}
}
makeRE := func(strs []string) *regexp.Regexp {
......
......@@ -79,7 +79,11 @@ func (l *loggerT) exitLocked(err error) {
f := logging.mu.exitOverride.f
logging.mu.Unlock()
if f != nil {
// Avoid conflicting lock order between l.mu and locks in f.
l.mu.Unlock()
f(2, err)
// Avoid double unlock on l.mu.
l.mu.Lock()
} else {
os.Exit(2)
}
......