test-gdb and test-userland: fix --dry-run missing seconds

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent eccefa4c57
commit 5e8add55fc
3 changed files with 12 additions and 4 deletions

View File

@@ -770,7 +770,7 @@ Valid emulators: {}
def log_error(self, msg):
print('error: {}'.format(msg), file=sys.stdout)
def log_info(self, msg, flush=False, **kwargs):
def log_info(self, msg='', flush=False, **kwargs):
if not self.env['quiet']:
print('{}'.format(msg), **kwargs)
if flush:
@@ -935,11 +935,19 @@ Valid emulators: {}
test_id_string = '{} {} {}'.format(self.env['emulator'], self.env['arch'], source)
if self.env['verbose']:
end = '\n'
else:
elif not self.env['dry_run']:
end = ' '
else:
end = ''
self.log_info(test_id_string, flush=True, end=end)
return test_id_string
def test_teardown(self, run_object):
if self.env['dry_run']:
self.log_info()
else:
self.log_info(self.seconds_to_hms(run_object.ellapsed_seconds))
def timed_main(self):
'''
Main action of the derived class.