buildman: Allow showing the list of boards with -n
[oweals/u-boot.git] / tools / buildman / board.py
index ae0e0b8e171987169194ab3b9a282cf375ca5fb4..f842d3a1fa1e927cc3cb8a1754f557cee87e90b6 100644 (file)
@@ -249,15 +249,15 @@ class Boards:
             exclude: List of boards to exclude, regardless of 'args'
 
         Returns:
-            Dictionary which holds the number of boards which were selected
+            Dictionary which holds the list of boards which were selected
             due to each argument, arranged by argument.
         """
         result = {}
         terms = self._BuildTerms(args)
 
-        result['all'] = 0
+        result['all'] = []
         for term in terms:
-            result[str(term)] = 0
+            result[str(term)] = []
 
         exclude_list = []
         for expr in exclude:
@@ -285,7 +285,7 @@ class Boards:
             if build_it:
                 board.build_it = True
                 if matching_term:
-                    result[matching_term] += 1
-                result['all'] += 1
+                    result[matching_term].append(board.target)
+                result['all'].append(board.target)
 
         return result