Skip to content

Instantly share code, notes, and snippets.

{
"_id": "f2",
"_rev": "3-706053447",
"views": {
"all": {
"map": "function (doc) { emit(doc._id, null); }"
}
}
}
{
"_id": "_design/f2",
"_rev": "4-3659521814",
"views": {
"all": {
"map": "function (doc) { emit(doc._id, null); }"
}
}
}
test
mport simplejson, 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/"
def search():
jsonurl = urllib.urlopen(tbox_url)
#Hack to remove the tinderbox_data = from the front
buildSteps = contentAll.split("BuildStep ended")
for step in buildSteps:
if reParsing.search(step):
contentByLine = step.split("\n")
for line in contentByLine:
if reStatus.search(line) != None:
getTestDetail(line)
break
doc['tests'] = tests
{
"_id": "000c09c1ba6167b142fbe3131930c176",
"_rev": "1-0cc377c56a380506e1c50aa8e9df281c",
"testtype": "mochitest",
"build": {
"product": "firefox",
"buildid": "1255468839",
"_rev": "1-327c2c8f43eccdbc5502f1918e4bfeb4",
"branch": "mozilla-central-linux",
"_id": "ae6dc1774d9e17ab922039e03fbe008c",
Macintosh-6:tests joelmaher$ python testAgent.py Traceback (most recent call last):
File "testAgent.py", line 28, in <module>
test_do_all_jobs()
File "testAgent.py", line 20, in test_do_all_jobs
create_job(db, {"jobtype":'xpcshell', "jobname":"test"+str(x)})
File "/Library/Python/2.5/site-packages/testbot-0.2pre-py2.5.egg/testbot/__init__.py", line 21, in create_job
db.create(job)
File "/Users/joelmaher/git/testbot/tests/__init__.py", line 343, in create
File "/Users/joelmaher/git/testbot/tests/__init__.py", line 36, in m
acintosh-6:tests joelmaher$ nosetests .
E
======================================================================
ERROR: test suite for <module 'tests' from '/Users/joelmaher/git/testbot/tests/__init__.pyc'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/nose-0.11.1-py2.5.egg/nose/suite.py", line 183, in run
self.setUp()
File "/Library/Python/2.5/site-packages/nose-0.11.1-py2.5.egg/nose/suite.py", line 264, in setUp
self.setupContext(ancestor)
Macintosh-6:tests joelmaher$ nosetests .
E
======================================================================
ERROR: test suite for <module 'tests' from '/Users/joelmaher/git/testbot/tests/__init__.pyc'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/nose-0.11.1-py2.5.egg/nose/suite.py", line 183, in run
self.setUp()
File "/Library/Python/2.5/site-packages/nose-0.11.1-py2.5.egg/nose/suite.py", line 264, in setUp
self.setupContext(ancestor)
Macintosh-6:tests joelmaher$ nosetests testAgent.py
E
======================================================================
ERROR: Failure: ClientException (Whoami failed for name secretagent
{"error":"not_found","reason":"Missing"}
)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/nose-0.11.1-py2.5.egg/nose/loader.py", line 379, in loadTestsFromName
addr.filename, addr.module)