From 638567e42507fde36a7ddaf2070278015f18e315 Mon Sep 17 00:00:00 2001 From: yuchuyang Date: Mon, 7 Nov 2022 21:37:32 -0800 Subject: [PATCH] config-tools: refine print out message after running board inspector 1. Generate success message when there is no critical error. 2. Generate note when there is error(s). Tracked-On: #8297 Signed-off-by: yuchuyang --- misc/config_tools/board_inspector/board_inspector.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/misc/config_tools/board_inspector/board_inspector.py b/misc/config_tools/board_inspector/board_inspector.py index 1b8737c8a..645f1b375 100755 --- a/misc/config_tools/board_inspector/board_inspector.py +++ b/misc/config_tools/board_inspector/board_inspector.py @@ -134,14 +134,11 @@ def summary_loginfo(board_xml): print("\033[1;31m{0}\033[0m".format(critical.strip('\n'))) print("="*length) - if len(error_list) != 0 and len(critical_list) == 0: + if len(critical_list) == 0: print( f"\033[1;32mSUCCESS: Board configuration file {board_xml} generated successfully and saved to {os.path.dirname(os.path.abspath(board_xml))}\033[0m\n") + if len(error_list) != 0: print("\033[1;36mNOTE: Board configuration file lacks important features, which will cause ACRN to fail build or boot. Resolve ERROR messages then run the tool again.\033[0m") - - elif len(warning_list) != 0 and len(error_list) == 0 and len(critical_list) == 0: - print( - f"\033[1;32mSUCCESS: Board configuration file {board_xml} generated successfully and saved to {os.path.dirname(os.path.abspath(board_xml))}\033[0m\n") tmpfile.close() def main(board_name, board_xml, args):