]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Drop warning about orphaned defconfigs
authorSimon Glass <sjg@chromium.org>
Thu, 3 Aug 2023 18:51:37 +0000 (12:51 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 5 Aug 2023 17:39:23 +0000 (11:39 -0600)
Some boards use a MAINTAINERS entry to specify common files without
referencing any defconfigs. This is allowed and should not result in a
warning.

Drop the warning in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/buildman/boards.py
tools/buildman/func_test.py

index 83adbf167c7d731140b0370f89c3420d8f749c7f..eef3f19f7ad6cc7dce0399f9538a6accae2d862f 100644 (file)
@@ -377,16 +377,9 @@ class MaintainersDatabase:
             Args:
                 linenum (int): Current line number
             """
-            added = False
             if targets:
                 for target in targets:
                     self.database[target] = (status, maintainers)
-                    added = True
-            if not added and (status != '-' and maintainers):
-                leaf = fname[len(srcdir) + 1:]
-                if leaf != 'MAINTAINERS':
-                    self.warnings.append(
-                        f'WARNING: orphaned defconfig in {leaf} ending at line {linenum + 1}')
 
         targets = []
         maintainers = []
index 3115700f07bd3d2da2a8e179fae74cd8e0045961..55dd494fe8ee36d02c45702420e57fd73ac377eb 100644 (file)
@@ -926,10 +926,7 @@ Active  aarch64     armv8 - armltd total_compute board2
         tools.write_file(main, data, binary=False)
         params_list, warnings = self._boards.build_board_list(config_dir, src)
         self.assertEquals(2, len(params_list))
-        self.assertEquals(
-            ["WARNING: no maintainers for 'board0'",
-             'WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 4',
-             ], warnings)
+        self.assertEquals(["WARNING: no maintainers for 'board0'"], warnings)
 
         # Mark a board as orphaned - this should give a warning
         lines = ['S: Orphaned' if line.startswith('S') else line
@@ -969,9 +966,7 @@ Active  aarch64     armv8 - armltd total_compute board2
         tools.write_file(main, both_data + extra, binary=False)
         params_list, warnings = self._boards.build_board_list(config_dir, src)
         self.assertEquals(2, len(params_list))
-        self.assertEquals(
-            ['WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 16'],
-             warnings)
+        self.assertFalse(warnings)
 
         # Add another TARGET to the Kconfig
         tools.write_file(main, both_data, binary=False)