print cli equivalent for commands called via python cli

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent 869e0b2d17
commit b72f75b531
5 changed files with 158 additions and 55 deletions

3
run
View File

@@ -618,7 +618,8 @@ Run QEMU with VNC instead of the default SDL. Connect to it with:
if not self.env['userland']:
if os.path.exists(self.env['guest_terminal_file']):
with open(self.env['guest_terminal_file'], 'br') as logfile:
if logfile.readlines()[-1].rstrip() == self.env['magic_fail_string']:
lines = logfile.readlines()
if lines and lines[-1].rstrip() == self.env['magic_fail_string']:
exit_status = 1
if exit_status != 0:
self.log_error('simulation error detected by parsing logs')