Commit 7cf95691 authored by Denis Bilenko's avatar Denis Bilenko

testrunner.py: for --stats, default to the runid of the latest run

parent 4950462e
......@@ -312,6 +312,9 @@ def get_testcases(cursor, runid, result=None):
def print_stats(options):
db = sqlite3.connect(options.db)
cursor = db.cursor()
if options.runid is None:
options.runid = cursor.execute('select runid from test order by started_at desc limit 1').fetchall()[0][0]
print 'Using the latest runid: %s' % options.runid
total = len(get_testcases(cursor, options.runid))
failed = get_testcases(cursor, options.runid, 'FAIL')
timedout = get_testcases(cursor, options.runid, 'TIMEOUT')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment