Move hostdb to a separate db directory.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 15 Nov 2010 00:39:18 +0000 (01:39 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 15 Nov 2010 00:39:18 +0000 (01:39 +0100)
buildfarm/sqldb.py
buildfarm/tests/__init__.py

index faf3cbf6197e54ba4d336e86fb4dab268e1365ab..dc506f0c45f0af7cb00849594354043676ff1e92 100644 (file)
@@ -207,7 +207,7 @@ class StormCachingBuildFarm(BuildFarm):
     def _get_store(self):
         if self.store is not None:
             return self.store
-        db_path = os.path.join(self.path, "hostdb.sqlite")
+        db_path = os.path.join(self.path, "db", "hostdb.sqlite")
         db = create_database("sqlite:%s?timeout=%f" % (db_path, self.timeout))
         self.store = Store(db)
         setup_schema(self.store)
index fb98f5516fe51e5a251ea8f8829e3665e7468bef..b3226d57e69fcbc3266764ac4c5c863e2497ffd7 100644 (file)
@@ -80,10 +80,10 @@ class BuildFarmTestCase(TestCase):
         super(BuildFarmTestCase, self).setUp()
         self.path = tempfile.mkdtemp()
 
-        for subdir in ["data", "data/upload", "data/oldrevs", "cache", "web", "lcov", "lcov/data"]:
+        for subdir in ["data", "data/upload", "data/oldrevs", "db", "cache", "web", "lcov", "lcov/data"]:
             os.mkdir(os.path.join(self.path, subdir))
 
-        db = database.create_database("sqlite:"+os.path.join(self.path, "hostdb.sqlite"))
+        db = database.create_database("sqlite:"+os.path.join(self.path, "db", "hostdb.sqlite"))
         store = Store(db)
         setup_schema(store)
         store.flush()