Просмотр исходного кода

Merge branch 'bugfix/unit_test_parser_only_dirs' into 'master'

unit tests: Make UnitTestParser ignore non-directories inside 'components' dirs

Tiny fix to UnitTestParser script behaviour, if you happen to have any stray files in your "components" directories.

See merge request !561

Angus Gratton 9 лет назад
Родитель
Сommit
fd8703bd2a
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      tools/unit-test-app/UnitTestParser.py

+ 2 - 1
tools/unit-test-app/UnitTestParser.py

@@ -1,5 +1,6 @@
 import yaml
 import os
+import os.path
 import re
 import sys
 import shutil
@@ -41,7 +42,7 @@ class Parser(object):
     def parse_test_folders(cls):
         test_folder_paths = list()
         os.chdir(os.path.join(IDF_PATH, "components"))
-        component_dirs = os.listdir(".")
+        component_dirs = [d for d in os.listdir(".") if os.path.isdir(d)]
         for dir in component_dirs:
             os.chdir(dir)
             if "test" in os.listdir("."):