diff --git a/ci/run.py b/ci/run.py index b7039c9..063e2cd 100755 --- a/ci/run.py +++ b/ci/run.py @@ -188,7 +188,12 @@ def main(): def start_and_test_with_db(db): info('Setting up seafile server with %s database', db) - server = ServerCtl(INSTALLDIR, db) + server = ServerCtl( + INSTALLDIR, + db=db, + # Use the newly built seaf-server (to avoid "make install" each time when developping locally) + seaf_server_bin=join(SeafileServer().projectdir, 'server/seaf-server') + ) server.setup() with server.run(): info('Testing with %s database', db) diff --git a/ci/serverctl.py b/ci/serverctl.py index 9170a4f..03e6c09 100755 --- a/ci/serverctl.py +++ b/ci/serverctl.py @@ -22,7 +22,7 @@ logger = logging.getLogger(__name__) class ServerCtl(object): - def __init__(self, datadir, db='sqlite3'): + def __init__(self, datadir, db='sqlite3', seaf_server_bin='seaf-server', ccnet_server_bin='ccnet-server'): self.db = db self.datadir = datadir self.central_conf_dir = join(datadir, 'conf') @@ -34,6 +34,9 @@ class ServerCtl(object): self.ccnet_log = join(self.log_dir, 'ccnet.log') self.seafile_log = join(self.log_dir, 'seafile.log') + self.ccnet_server_bin = ccnet_server_bin + self.seaf_server_bin = seaf_server_bin + self.ccnet_proc = None self.seafile_proc = None @@ -137,7 +140,7 @@ connection_charset = utf8 def start_ccnet(self): cmd = [ - "ccnet-server", + self.ccnet_server_bin, "-F", self.central_conf_dir, "-c", @@ -149,7 +152,7 @@ connection_charset = utf8 def start_seafile(self): cmd = [ - "seaf-server", + self.seaf_server_bin, "-F", self.central_conf_dir, "-c",