The branch, master has been updated via 1fc20bd No longer create cache directory. via 8a52885 remove support for writing host.list file (no longer necessary). from 667a1dd Remove remaining files from the old perl-based buildfarm.
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 1fc20bd9284e442cae47d5298a01f6fedfe9505e Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Nov 22 13:49:34 2010 +0100 No longer create cache directory. commit 8a52885cb8fa58b707a14541b1e6ebbc310f2f5e Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Nov 22 13:46:11 2010 +0100 remove support for writing host.list file (no longer necessary). ----------------------------------------------------------------------- Summary of changes: admin.py | 11 ----------- buildfarm/hostdb.py | 6 ------ buildfarm/tests/__init__.py | 2 +- buildfarm/tests/test_hostdb.py | 13 ------------- 4 files changed, 1 insertions(+), 31 deletions(-) Changeset truncated at 500 lines: diff --git a/admin.py b/admin.py index 4dd2b98..07c0164 100755 --- a/admin.py +++ b/admin.py @@ -38,14 +38,6 @@ def update_rsyncd_secrets(): os.rename(temp_rsyncd_secrets, "../rsyncd.secrets") -def update_hosts_list(): - temp_hosts_list_file = os.path.join(os.path.dirname(__file__), "web", "hosts.list.new") - f = open(temp_hosts_list_file, "w") - f.writelines(buildfarm.hostdb.create_hosts_list()) - f.close() - - os.rename(temp_hosts_list_file, os.path.join(os.path.dirname(__file__), "web/hosts.list")) - dry_run = False print "Samba Build farm management tool" @@ -82,7 +74,6 @@ elif op == "remove": else: buildfarm.hostdb.commit() update_rsyncd_secrets() - update_hosts_list() elif op == "modify": hostname = raw_input("Please enter hostname to modify: ") try: @@ -109,7 +100,6 @@ elif op == "modify": print "Unknown subcommand %s" % mod_op sys.exit(1) update_rsyncd_secrets() - update_hosts_list() elif op == "add": hostname = raw_input("Machine hostname: ") try: @@ -193,7 +183,6 @@ Thanks, your friendly Samba build farm administrator <bu...@samba.org>""" % owne s.sendmail(msg["From"], recipients, msg.as_string()) s.quit() update_rsyncd_secrets() - update_hosts_list() elif op == "info": if not args: args = [raw_input("Hostname: ")] diff --git a/buildfarm/hostdb.py b/buildfarm/hostdb.py index fa424b2..d56e152 100644 --- a/buildfarm/hostdb.py +++ b/buildfarm/hostdb.py @@ -122,12 +122,6 @@ class HostDatabase(object): else: yield "# %s password is unknown\n\n" % host.name - def create_hosts_list(self): - """Write out the web/""" - - for host in self.hosts(): - yield "%s: %s\n" % (host.name, host.platform.encode("utf-8")) - def commit(self): pass diff --git a/buildfarm/tests/__init__.py b/buildfarm/tests/__init__.py index 3c40379..bef98f8 100644 --- a/buildfarm/tests/__init__.py +++ b/buildfarm/tests/__init__.py @@ -92,7 +92,7 @@ class BuildFarmTestCase(TestCase): super(BuildFarmTestCase, self).setUp() self.path = tempfile.mkdtemp() - for subdir in ["data", "data/upload", "data/oldrevs", "db", "cache", "web", "lcov", "lcov/data"]: + for subdir in ["data", "data/upload", "data/oldrevs", "db", "web", "lcov", "lcov/data"]: os.mkdir(os.path.join(self.path, subdir)) db = database.create_database("sqlite:"+os.path.join(self.path, "db", "hostdb.sqlite")) diff --git a/buildfarm/tests/test_hostdb.py b/buildfarm/tests/test_hostdb.py index f6074cc..f9372d7 100644 --- a/buildfarm/tests/test_hostdb.py +++ b/buildfarm/tests/test_hostdb.py @@ -67,19 +67,6 @@ class HostDatabaseTests(object): host = self.db.createhost(name="foo", owner=u"Jelmer", owner_email=u"jel...@samba.org") host.update_owner(new_owner=u"Matthieu", new_owner_email=u"m...@samba.org") - def test_create_hosts_list(self): - self.db.createhost(name="foo", owner=u"Jelmer", owner_email=u"jel...@samba.org", - platform=u"Debian") - self.db.createhost(name="bla", owner=u"Jelmer", owner_email=u"jel...@samba.org", - platform=u"Fedora") - expected = [ - "foo: Debian\n", - "bla: Fedora\n"] - expected.sort() - got = list(self.db.create_hosts_list()) - got.sort() - self.assertEquals(expected, got) - def test_create_rsync_secrets(self): self.db.createhost(name="foo") self.db.createhost(name="bla", owner=u"Jelmer", owner_email=u"jel...@samba.org", -- build.samba.org