path: root/utils
diff options
authorGravatar Victor Huesca <victor.huesca@bootlin.com>2019-08-04 16:21:43 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-08-05 00:02:35 +0200
commitcaead54274416651b3eb732919c2f4f375b34a82 (patch)
treea6beab497d6a62d683e9722440482939f6e406a7 /utils
parente635836494d3d4607146b540cbcd0b3093fc8205 (diff)
utils/getdeveloperlib.py: add defconfig parsing
This patch extends the Developer class so that it associates each developer with the defconfigs (in configs/) is in responsible for, according to the DEVELOPERS file. It will allow using the getdeveloperlib module to find which developer is responsible for which defconfig, and send e-mail notifications of defconfig build failures. Signed-off-by: Victor Huesca <victor.huesca@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils')
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
index c0eff7df29..c18236b3a5 100644
--- a/utils/getdeveloperlib.py
+++ b/utils/getdeveloperlib.py
@@ -120,6 +120,7 @@ class Developer:
self.architectures = parse_developer_architectures(files)
self.infras = parse_developer_infras(files)
self.runtime_tests = parse_developer_runtime_tests(files)
+ self.defconfigs = parse_developer_defconfigs(files)
def hasfile(self, f):
f = os.path.abspath(f)
@@ -141,6 +142,8 @@ class Developer:
things.append('{} infras'.format(len(self.infras)))
if len(self.runtime_tests):
things.append('{} tests'.format(len(self.runtime_tests)))
+ if len(self.defconfigs):
+ things.append('{} defconfigs'.format(len(self.defconfigs)))
if things:
return 'Developer <{} ({})>'.format(name, ', '.join(things))
@@ -203,6 +206,14 @@ def parse_developer_infras(fnames):
return infras
+def parse_developer_defconfigs(fnames):
+ """Given a list of file names, returns the config names
+ corresponding to defconfigs."""
+ return {os.path.basename(fname[:-10])
+ for fname in fnames
+ if fname.endswith('_defconfig')}
def parse_developer_runtime_tests(fnames):
"""Given a list of file names, returns the runtime tests
corresponding to the file."""