mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-02 17:31:22 +01:00
moveconfig: Show a summary at the end
Rather than printing all the failed boards, which are now easily visible on the terminal, just show a summary. Sort it by defconfig and drop the '_defconfig' suffix. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6b25d21c86
commit
dc1d2e6c7f
@ -571,8 +571,8 @@ class Slot:
|
|||||||
successfully, or False when it fails.
|
successfully, or False when it fails.
|
||||||
"""
|
"""
|
||||||
# output at least 30 characters to hide the "* defconfigs out of *".
|
# output at least 30 characters to hide the "* defconfigs out of *".
|
||||||
|
name = self.defconfig[:-len('_defconfig')]
|
||||||
if self.log:
|
if self.log:
|
||||||
name = self.defconfig[:-len('_defconfig')]
|
|
||||||
|
|
||||||
# Put the first log line on the first line
|
# Put the first log line on the first line
|
||||||
log = name.ljust(20) + ' ' + self.log[0]
|
log = name.ljust(20) + ' ' + self.log[0]
|
||||||
@ -588,7 +588,7 @@ class Slot:
|
|||||||
sys.exit('Exit on error.')
|
sys.exit('Exit on error.')
|
||||||
# If --exit-on-error flag is not set, skip this board and continue.
|
# If --exit-on-error flag is not set, skip this board and continue.
|
||||||
# Record the failed board.
|
# Record the failed board.
|
||||||
self.failed_boards.add(self.defconfig)
|
self.failed_boards.add(name)
|
||||||
|
|
||||||
self.progress.inc(success)
|
self.progress.inc(success)
|
||||||
self.progress.show()
|
self.progress.show()
|
||||||
@ -618,6 +618,7 @@ class Slots:
|
|||||||
"""
|
"""
|
||||||
self.args = args
|
self.args = args
|
||||||
self.slots = []
|
self.slots = []
|
||||||
|
self.progress = progress
|
||||||
self.col = col
|
self.col = col
|
||||||
devnull = subprocess.DEVNULL
|
devnull = subprocess.DEVNULL
|
||||||
make_cmd = get_make_cmd()
|
make_cmd = get_make_cmd()
|
||||||
@ -662,8 +663,8 @@ class Slots:
|
|||||||
ret = False
|
ret = False
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def show_failed_boards(self):
|
def show_result(self):
|
||||||
"""Display all of the failed boards (defconfigs)."""
|
"""Show the results of processing"""
|
||||||
boards = set()
|
boards = set()
|
||||||
output_file = 'moveconfig.failed'
|
output_file = 'moveconfig.failed'
|
||||||
|
|
||||||
@ -671,14 +672,16 @@ class Slots:
|
|||||||
boards |= slot.get_failed_boards()
|
boards |= slot.get_failed_boards()
|
||||||
|
|
||||||
if boards:
|
if boards:
|
||||||
boards = '\n'.join(boards) + '\n'
|
print(self.col.build(
|
||||||
msg = 'The following boards were not processed due to error:\n'
|
self.col.RED,
|
||||||
msg += boards
|
f'{len(boards)} failed (see {output_file})', True))
|
||||||
msg += f'(the list has been saved in {output_file})\n'
|
boards = '\n'.join(sorted(boards)) + '\n'
|
||||||
print(self.col.build(self.col.RED, msg, bright=True),
|
|
||||||
file=sys.stderr)
|
|
||||||
|
|
||||||
write_file(output_file, boards)
|
write_file(output_file, boards)
|
||||||
|
else:
|
||||||
|
# Add enough spaces to overwrite the progress indicator
|
||||||
|
print(self.col.build(
|
||||||
|
self.col.GREEN,
|
||||||
|
f'{self.progress.total} processed ', bright=True))
|
||||||
|
|
||||||
class ReferenceSource:
|
class ReferenceSource:
|
||||||
|
|
||||||
@ -757,8 +760,7 @@ def move_config(toolchains, args, db_queue, col):
|
|||||||
while not slots.empty():
|
while not slots.empty():
|
||||||
time.sleep(SLEEP_TIME)
|
time.sleep(SLEEP_TIME)
|
||||||
|
|
||||||
print('')
|
slots.show_result()
|
||||||
slots.show_failed_boards()
|
|
||||||
|
|
||||||
def find_kconfig_rules(kconf, config, imply_config):
|
def find_kconfig_rules(kconf, config, imply_config):
|
||||||
"""Check whether a config has a 'select' or 'imply' keyword
|
"""Check whether a config has a 'select' or 'imply' keyword
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user