print "sqlite: " + str(e)
print "sql: %r" % (params, )
-def report(conn, prefill, build, commit, run, test, result, duration, logdir):
+def report(conn, prefill, build, commit, run, test, result, duration, logdir,
+ sql_commit=True):
if conn:
if not build:
build = ''
params = (test, result, run, time.time(), duration, build, commit)
try:
conn.execute(sql, params)
- conn.commit()
+ if sql_commit:
+ conn.commit()
except Exception, e:
print "sqlite: " + str(e)
print "sql: %r" % (params, )
for t in tests_to_run:
name = t.__name__.replace('test_', '', 1)
report(conn, False, args.build, args.commit, run, name, 'NOTRUN', 0,
- args.logdir)
+ args.logdir, sql_commit=False)
+ conn.commit()
if args.split:
vals = args.split.split('/')