@defer.inlineCallbacks
def getMaster(case, reactor, config_dict):
 basedir = FilePath(case.mktemp())
 basedir.createDirectory()
 config_dict['buildbotNetUsageData'] = None
 master = BuildMaster(basedir.path, reactor=reactor, config_loader=DictLoader(config_dict))
 if ('db_url' not in config_dict):
  config_dict['db_url'] = 'sqlite://'
 master.config.db['db_url'] = config_dict['db_url']
 (yield master.db.setup(check_version=False))
 (yield master.db.model.upgrade())
 master.db.setup = (lambda : None)
 (yield master.startService())
 case.addCleanup(master.db.pool.shutdown)
 case.addCleanup(master.stopService)
 defer.returnValue(master)

@ defer . inlineCallbacks def getMaster ( case , reactor , config_dict ) : basedir = FilePath ( case . mktemp ( ) ) basedir . createDirectory ( ) config_dict [ 'buildbotNetUsageData' ] = None master = BuildMaster ( basedir . path , reactor = reactor , config_loader = DictLoader ( config_dict ) ) if ( 'db_url' not in config_dict ) : config_dict [ 'db_url' ] = 'sqlite://' master . config . db [ 'db_url' ] = config_dict [ 'db_url' ] ( yield master . db . setup ( check_version = False ) ) ( yield master . db . model . upgrade ( ) ) master . db . setup = ( lambda : None ) ( yield master . startService ( ) ) case . addCleanup ( master . db . pool . shutdown ) case . addCleanup ( master . stopService ) defer . returnValue ( master )
create a started buildmaster with the given configuration .