Add a detection of missing file in filegroup.uses

pull/19769/head
Esun Kim 5 years ago
parent 555d4ddb3d
commit e6d58923df
  1. 7
      tools/buildgen/plugins/expand_filegroups.py

@ -55,6 +55,7 @@ def mako_plugin(dictionary):
libs = dictionary.get('libs')
targets = dictionary.get('targets')
filegroups_list = dictionary.get('filegroups')
filegroups_set = set(fg['name'] for fg in filegroups_list)
filegroups = {}
for fg in filegroups_list:
@ -78,8 +79,10 @@ def mako_plugin(dictionary):
todo = todo[1:]
# check all uses filegroups are present (if no, skip and come back later)
skip = False
for uses in cur.get('uses', []):
if uses not in filegroups:
for use in cur.get('uses', []):
assert use in filegroups_set, (
"filegroup(%s) uses non-existent %s" % (cur['name'], use))
if use not in filegroups:
skip = True
if skip:
skips += 1

Loading…
Cancel
Save