summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorDan Crosta <dcrosta@10gen.com>2012-04-10 13:37:48 -0400
committerDan Crosta <dcrosta@10gen.com>2012-04-10 16:39:48 -0400
commit8b4d9dbe20e0f3f75a62d5ababe12e50f1d935ab (patch)
treea22e749823ae17bf68e7c80dfabc1edfd3b37e58 /buildscripts
parent790a7d0655f6ac9a772641c4af15dccd09817aed (diff)
downloadmongo-8b4d9dbe20e0f3f75a62d5ababe12e50f1d935ab.tar.gz
was accidentally sending (int, None) tuples as log lines
this broke the buildlogger webapp. a corresponding patch is made on that side
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/buildlogger.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/buildscripts/buildlogger.py b/buildscripts/buildlogger.py
index bebd23af5c9..d025a0717f6 100644
--- a/buildscripts/buildlogger.py
+++ b/buildscripts/buildlogger.py
@@ -220,15 +220,15 @@ def wrap_test(command):
end_time = time.time()
buf.append((end_time, '*** finished test %r in %f seconds ***' % (test_filename, end_time - start_time)))
append_test_logs(build_id, test_id, buf)
+ else:
+ buf.append((time.time(), line))
+ if len(buf) > 100 or (buf and time.time() - buf[0][0] > 10):
+ append_test_logs(build_id, test_id, buf)
- buf.append((time.time(), line))
- if len(buf) > 100 or (buf and time.time() - buf[0][0] > 10):
- append_test_logs(build_id, test_id, buf)
-
- # this is like "buf = []", but doesn't change
- # the "buf" reference -- necessary to make
- # the closure work
- buf[:] = []
+ # this is like "buf = []", but doesn't change
+ # the "buf" reference -- necessary to make
+ # the closure work
+ buf[:] = []
# the peculiar formatting here matches what is printed by
# smoke.py when starting tests
@@ -280,15 +280,15 @@ def wrap_global(command):
# callback is called with None when the
# command is finished
append_global_logs(build_id, buf)
-
- buf.append((time.time(), line))
- if len(buf) > 100 or (buf and time.time() - buf[0][0] > 10):
- append_global_logs(build_id, buf)
-
- # this is like "buf = []", but doesn't change
- # the "buf" reference -- necessary to make
- # the closure work
- buf[:] = []
+ else:
+ buf.append((time.time(), line))
+ if len(buf) > 100 or (buf and time.time() - buf[0][0] > 10):
+ append_global_logs(build_id, buf)
+
+ # this is like "buf = []", but doesn't change
+ # the "buf" reference -- necessary to make
+ # the closure work
+ buf[:] = []
return loop_and_callback(command, callback)