def _get_store(self): if self.store is not None: return self.store db_dir_path = os.path.join(self.path, "db") if not os.path.isdir(db_dir_path): os.mkdir(db_dir_path) db_path = os.path.join(db_dir_path, "hostdb.sqlite") db = create_database("sqlite:%s?timeout=%f" % (db_path, self.timeout)) self.store = Store(db) setup_schema(self.store) return self.store
def setUp(self): super(BuildFarmTestCase, self).setUp() self.path = tempfile.mkdtemp() for subdir in ["data", "data/upload", "data/oldrevs", "db", "web", "lcov", "lcov/data"]: os.mkdir(os.path.join(self.path, subdir)) self.db_url = "sqlite:"+os.path.join(self.path, "db", "hostdb.sqlite") db = database.create_database(self.db_url) store = Store(db) setup_schema(store) store.commit() self.write_compilers([]) self.write_hosts({})
def setUp(self): super(BuildFarmTestCase, self).setUp() self.path = tempfile.mkdtemp() for subdir in [ "data", "data/upload", "data/oldrevs", "db", "web", "lcov", "lcov/data" ]: os.mkdir(os.path.join(self.path, subdir)) self.db_url = "sqlite:" + os.path.join(self.path, "db", "hostdb.sqlite") db = database.create_database(self.db_url) store = Store(db) setup_schema(store) store.commit() self.write_compilers([]) self.write_hosts({})