kola: don't error if external tests directory doesn't exist
Fixes:
@@ -665,8 +665,13 @@ func RegisterExternalTestsWithPrefix(dir, prefix string) error {
testsdir := filepath.Join(dir, "tests/kola")
children, err := ioutil.ReadDir(testsdir)
if err != nil {
+ if os.IsNotExist(err) {
+ // The directory doesn't exist.. Skip registering tests
+ return nil
+ } else {
return errors.Wrapf(err, "reading %s", dir)
}
+ }
if err := registerTestDir(testsdir, prefix, children); err != nil {
return err
