only test directories

This commit is contained in:
Thibault bui Koechlin 2020-05-27 18:22:49 +02:00
parent 03b3b11079
commit 02036fa0d1

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 {