Merge "Use first test from subunit_stream for run_at value"

This commit is contained in:
Jenkins 2016-03-01 00:57:55 +00:00 committed by Gerrit Code Review
commit f4667bbba4
1 changed files with 5 additions and 1 deletions

View File

@ -183,7 +183,11 @@ class Subunit2SQLProcessor(object):
logging.debug('Converting Subunit V2 stream to SQL')
stream = read_subunit.ReadSubunit(subunit_v2,
targets=self.extra_targets)
shell.process_results(stream.get_results())
results = stream.get_results()
start_time = sorted(
[results[x]['start_time'] for x in results if x != 'run_time'])[0]
shell.CONF.set_override('run_at', start_time.isoformat())
shell.process_results(results)
subunit_v2.close()