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
pull/407/merge
Angus Gratton 2017-03-09 06:58:02 +08:00
commit fd8703bd2a
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

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