only test directories

This commit is contained in:
Thibault bui Koechlin 2020-05-27 18:22:49 +02:00 committed by Farica
parent 8d43abbf4c
commit 3fa5122db7

View file

@ -42,6 +42,9 @@ func TestParser(t *testing.T) {
t.Fatalf("Unable to read test directory : %s", err)
}
for _, fd := range fds {
if !fd.IsDir() {
continue
}
fname := "./tests/" + fd.Name()
log.Infof("Running test on %s", fname)
if err := testOneParser(pctx, fname, nil); err != nil {
@ -72,6 +75,9 @@ func BenchmarkParser(t *testing.B) {
t.Fatalf("Unable to read test directory : %s", err)
}
for _, fd := range fds {
if !fd.IsDir() {
continue
}
fname := "./tests/" + fd.Name()
log.Infof("Running test on %s", fname)
if err := testOneParser(pctx, fname, t); err != nil {