Skip to content

Commit 8b11a1f

Browse files
nashifAnas Nashif
authored andcommitted
sanitycheck: use glob to find board yaml file
Signed-off-by: Anas Nashif <[email protected]>
1 parent a2caf36 commit 8b11a1f

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

scripts/sanitycheck

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,16 +1332,13 @@ class TestSuite:
13321332
board_root = os.path.abspath(board_root)
13331333

13341334
debug("Reading platform configuration files under %s..." % board_root)
1335-
for dirpath, dirnames, filenames in os.walk(board_root):
1336-
for filename in filenames:
1337-
if filename.endswith(".yaml"):
1338-
fn = os.path.join(dirpath, filename)
1339-
verbose("Found plaform configuration " + fn)
1340-
try:
1341-
platform = Platform(fn)
1342-
self.platforms.append(platform)
1343-
except RuntimeError as e:
1344-
error("E: %s: can't load: %s" % (fn, e))
1335+
for fn in glob.glob(os.path.join(board_root, "*", "*", "*.yaml")):
1336+
verbose("Found plaform configuration " + fn)
1337+
try:
1338+
platform = Platform(fn)
1339+
self.platforms.append(platform)
1340+
except RuntimeError as e:
1341+
error("E: %s: can't load: %s" % (fn, e))
13451342

13461343
arches = []
13471344
for p in self.platforms:

0 commit comments

Comments
 (0)