Skip to content

Commit

Permalink
fix test_web
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Feb 23, 2010
1 parent c176786 commit 6f62eb0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions buildbot/broken_test/runs/test_web.py
Expand Up @@ -26,9 +26,14 @@ class SimpleMaster(master.BuildMaster):
control over the loading of the config file."""

def __init__(self, basedir):
spec = db.DBSpec("sqlite3", os.path.join(basedir, "state.sqlite"))
db.create_db(spec)
master.BuildMaster.__init__(self, basedir, db=spec)
# create the db here, for lack of somewhere better to do it
dbfile = os.path.join(basedir, "state.sqlite")
if os.path.exists(dbfile):
os.unlink(dbfile)
dbspec = db.DBSpec.from_url("sqlite:///state.sqlite", basedir=basedir)
db.create_db(dbspec)

master.BuildMaster.__init__(self, basedir)
self.readConfig = True

components.registerAdapter(master.Control, SimpleMaster, interfaces.IControl)
Expand All @@ -51,6 +56,8 @@ def __init__(self, basedir):
c['builders'] = [
BuilderConfig(name='builder1', slavename='bot1name', factory=BuildFactory()),
]
c['db_url'] = 'sqlite:///state.sqlite'
"""


Expand Down

0 comments on commit 6f62eb0

Please sign in to comment.