aboutsummaryrefslogtreecommitdiffstats
path: root/tools/buildman/boards.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-19 17:48:23 -0600
committerSimon Glass <sjg@chromium.org>2023-07-24 09:34:10 -0600
commitc649153b5885ebd2beeb9ebf997896da8321c480 (patch)
tree2c4e8c2190872d18b06a180d1e78687fe461bc7a /tools/buildman/boards.py
parentad99599ca2b584eb388e09406c6ef2b21a488f0a (diff)
downloadu-boot-c649153b5885ebd2beeb9ebf997896da8321c480.tar.gz
buildman: Correct operation of MAINTAINERS N:
This doesn't work as intended. Instead it scans every defconfig file in the source tree. Fix it and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/boards.py')
-rw-r--r--tools/buildman/boards.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py
index dabf694e0d0..bf396574e22 100644
--- a/tools/buildman/boards.py
+++ b/tools/buildman/boards.py
@@ -411,12 +411,17 @@ class MaintainersDatabase:
walk_path = os.walk(os.path.join(srcdir, 'configs'))
for dirpath, _, fnames in walk_path:
for cfg in fnames:
- path = os.path.join(dirpath, cfg)
+ path = os.path.join(dirpath, cfg)[len(srcdir) + 1:]
front, match, rear = path.partition('configs/')
- if not front and match:
- front, match, rear = rear.rpartition('_defconfig')
- if match and not rear:
- targets.append(front)
+ if front or not match:
+ continue
+ front, match, rear = rear.rpartition('_defconfig')
+
+ # Use this entry if it matches the defconfig file
+ # without the _defconfig suffix. For example
+ # 'am335x.*' matches am335x_guardian_defconfig
+ if match and not rear and re.search(rest, front):
+ targets.append(front)
elif line == '\n':
add_targets(linenum)
targets = []