test-modules: convert to use LkmcCliFunction

This commit is contained in:
Ciro Santilli
2019-01-22 00:00:00 +00:00
committed by Ciro Santilli 六四事件 法轮功
parent 4a92813252
commit 718941f3cf
8 changed files with 112 additions and 77 deletions

7
run
View File

@@ -618,9 +618,10 @@ 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:
lines = logfile.readlines()
if lines and lines[-1].rstrip() == self.env['magic_fail_string']:
exit_status = 1
for line in logfile.readlines():
if line.rstrip() == self.env['magic_fail_string']:
exit_status = 1
break
if exit_status != 0:
self.log_error('simulation error detected by parsing logs')
return exit_status