index: skip dirs stating with _, like _obj

Change-Id: I6c12e2f2740e417fa3858f9872e7ea60843c4877
This commit is contained in:
Brad Fitzpatrick 2012-03-28 16:45:54 -07:00
parent 95b9622271
commit 2d0e0de553
1 changed files with 14 additions and 9 deletions

View File

@ -127,18 +127,23 @@ func TestIndexerTestsCompleteness(t *testing.T) {
if err != nil {
t.Fatal(err)
}
Files:
for _, file := range files {
if !file.IsDir() {
name := file.Name()
if !file.IsDir() || strings.HasPrefix(name, "_") || skipDir(name) {
continue
}
for _, v := range excludedDirs {
if file.Name() == v {
continue Files
}
}
if err = hasAllRequiredTests(file.Name(), t); err != nil {
t.Fatal(err)
if err := hasAllRequiredTests(name, t); err != nil {
t.Fatalf("dir %q missing tests: %v", err)
}
}
}
func skipDir(name string) bool {
for _, v := range excludedDirs {
if v == name {
return true
}
}
return false
}