From 95c1800b0ec86eeff7aaa13d2cb1942fda3209dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Thu, 15 Nov 2018 00:00:02 +0000 Subject: [PATCH] run: dont break on userland due to missing termout file --- run | 13 +++++++------ run-gdb | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/run b/run index feb8375..c38fc4f 100755 --- a/run +++ b/run @@ -399,12 +399,13 @@ def main(args, extra_args=None): for line in logfile: if panic_re.search(line): error_string_found = True - with open(common.guest_terminal_file, 'br') as logfile: - lines = logfile.readlines() - if lines: - last_line = lines[-1] - if last_line.rstrip() == common.magic_fail_string: - error_string_found = True + if os.path.exists(common.guest_terminal_file): + with open(common.guest_terminal_file, 'br') as logfile: + lines = logfile.readlines() + if lines: + last_line = lines[-1] + if last_line.rstrip() == common.magic_fail_string: + error_string_found = True if error_string_found: common.log_error('simulation error detected by parsing logs') return 1 diff --git a/run-gdb b/run-gdb index c6cad13..6b4b16c 100755 --- a/run-gdb +++ b/run-gdb @@ -228,7 +228,7 @@ the script is a .py file next to the source code. ''' ) parser.add_argument( - '--userland', default=defaults['userland'], + '-u', '--userland', default=defaults['userland'], ) parser.add_argument( 'break_at', nargs='?',