[PATCH v4 17/83] buildman: Sort the maintainer warnings

Simon Glass sjg at chromium.org
Thu Jul 20 01:48:25 CEST 2023


Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v4:
- Add new patch to sort the maintainer warnings

 tools/buildman/boards.py    | 4 ++--
 tools/buildman/func_test.py | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py
index 422f3476b011..269cafa6adc7 100644
--- a/tools/buildman/boards.py
+++ b/tools/buildman/boards.py
@@ -766,7 +766,7 @@ class Boards:
         """
         database = MaintainersDatabase()
         for (dirpath, _, filenames) in os.walk(srcdir):
-            if 'MAINTAINERS' in filenames:
+            if 'MAINTAINERS' in filenames and 'tools/buildman' not in dirpath:
                 database.parse_file(srcdir,
                                     os.path.join(dirpath, 'MAINTAINERS'))
 
@@ -779,7 +779,7 @@ class Boards:
             else:
                 params['status'] = '-'
             params_list[i] = params
-        return database.warnings
+        return sorted(database.warnings)
 
     @classmethod
     def format_and_output(cls, params_list, output):
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 149551e6f33c..c962083a43fb 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -919,8 +919,9 @@ Active  aarch64     armv8 - armltd total_compute board2
         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 4',
-             "WARNING: no maintainers for 'board0'"], warnings)
+            ["WARNING: no maintainers for 'board0'",
+             'WARNING: orphaned defconfig in boards/board0/MAINTAINERS ending at line 4',
+             ], warnings)
 
         # Remove the maintainer line (M:) from a file (this should be fine)
         lines = [line for line in orig_data.splitlines(keepends=True)
-- 
2.41.0.487.g6d72f3e995-goog



More information about the U-Boot mailing list