Skip to content

Instantly share code, notes, and snippets.

View mikeal's full-sized avatar
🏠
Working from home

Mikeal Rogers mikeal

🏠
Working from home
View GitHub Profile
function (keys, values, rereduce) {
retval = {pass:0, fail:0, todo:0}
var doTest = function (test) {
retval.pass = retval.pass + test.pass;
retval.fail = retval.fail + test.fail;
retval.todo = retval.todo + test.todo;
}
if (!rereduce) {
for (i in values) {
for (v in values[i]) {
[Mon, 17 Aug 2009 23:02:14 GMT] [debug] [<0.3968.0>] 'POST' /couchquery_unittest/_bulk_docs {1,1}
Headers: [{'Accept-Encoding',"identity"},
{'Content-Length',"78"},
{'Content-Type',"application/json"},
{'Host',"localhost:5984"},
{'User-Agent',"Python-httplib2/$Rev$"}]
[Mon, 17 Aug 2009 23:02:14 GMT] [error] [<0.3968.0>] Uncaught error in HTTP request: {error,function_clause}
[Mon, 17 Aug 2009 23:02:14 GMT] [debug] [<0.3968.0>] Stacktrace: [{couch_httpd_db,'-db_req/2-fun-0-',[<<"_rev">>]},
rows = self.db.views.fennecResults.entireBuildsById(keys=[id1, id2])
doc1 = rows[id1]
doc2 = rows[id2]
if len(doc1) == 0 or len(doc2) == 0:
return MakoResponse("error", error="input is not a valid build id")
else:
build1 = Build(doc1[0])
build2 = Build(doc2[0])
answer = build1.compare(build2)
class TestsResult():
def __init__(self, tests):
self.numtestfiles = len(tests)
self.tests = tests
def smart_sum(x, y):
x['totalfails'] += y['fail']
x['totalpasses'] += y['pass']
x['totaltodos'] += y['todo']
try:
import json
except:
import simplejson as json
import urllib
import types
tbox_url = 'http://tinderbox.mozilla.org/showbuilds.cgi?tree=Mobile&json=1&noignore=1'
logroot = "http://tinderbox.mozilla.org/showlog.cgi?log=Mobile/"
➜ /Applications CouchDBX-0.10.0-R13B02-64bit-Snow-Leopard.app/Contents/Resources/couchdbx-core/couchdb/lib/couchdb/bin/couchjs CouchDBX-0.10.0-R13B02-64bit-Snow-Leopard.app/Contents/Resources/couchdbx-core/couchdb/share/couchdb/server/main.js
dyld: Library not loaded: Darwin_DBG.OBJ/libjs.dylib
Referenced from: /Applications/CouchDBX-0.10.0-R13B02-64bit-Snow-Leopard.app/Contents/Resources/couchdbx-core/couchdb/lib/couchdb/bin/couchjs
Reason: image not found
[1] 9346 trace trap
class WhimbooRestart(MozmillRestart):
def __init__(self, *args, **kwargs):
super(MozMillRestart, self).__init__(*args, **kwargs)
self.add_listener(self.whimboo_stuff, eventType="mozmill.persist")
def whimboo_stuff(self, obj):
pass
class WhimbooCLI(RestartCLI):
mozmill_class = WhimbooRestart
@mikeal
mikeal / gist:216535
Created October 23, 2009 01:41 — forked from jmaher/gist:216530
from couchquery import Database
from testbot import create_job
from testbot.client import Client
class TestAgent(Client):
jobtypes = ['xpcshell']
def do_job(self, job):
print job
import os
from mozmilll import CLI
extension_path = os.path.join(os.path.dirname(__file__), 'jetpack.xpi')
class JetpackCLI(CLI):
def get_profile(self, *args, **kwargs):
profile = super(JetpackCLI, self).get_profile(*args, **kwargs)
profile.install_plugin(extension_path)
return profile
if files is None: files = []
for full_path in (os.path.join(folder, f) for f in files if os.path.isdir(os.path.join(folder, f))):
self.args.append(full_path)