[SCM] build.samba.org - branch master updated
Jelmer Vernooij
jelmer at samba.org
Tue Nov 16 17:30:43 MST 2010
The branch, master has been updated
via 2f13a56 Merge tests.
via c6dfd79 add tests for get_old_revs.
via d1e63ac Add hostdb.host() test. Improve unicode handling in web ui.
from f53728a Unicode encoding hostname if necessary.
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2f13a563d49e4fd48c264850beadea43d4874be9
Merge: f53728a8f2d615246751e272f3697203602baadc c6dfd79f0f75c261e25ebf3692e25ff6c72f515c
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Nov 17 01:28:40 2010 +0100
Merge tests.
commit c6dfd79f0f75c261e25ebf3692e25ff6c72f515c
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Nov 15 02:29:36 2010 +0100
add tests for get_old_revs.
commit d1e63ac9f7a11aead688103a9e6fb4f98d4de482
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Mon Nov 15 02:11:04 2010 +0100
Add hostdb.host() test.
Improve unicode handling in web ui.
-----------------------------------------------------------------------
Summary of changes:
buildfarm/data.py | 3 +++
buildfarm/tests/test_data.py | 24 ++++++++++++++++++++++++
buildfarm/tests/test_hostdb.py | 5 +++++
3 files changed, 32 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildfarm/data.py b/buildfarm/data.py
index 750deac..5c7fe7f 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -209,6 +209,9 @@ class Build(object):
self.compiler = compiler
self.commit_revision = self.revision = rev
+ def __eq__(self, other):
+ return (self.log_checksum() == other.log_checksum())
+
def __repr__(self):
if self.revision is not None:
return "<%s: revision %s of %s on %s using %s>" % (self.__class__.__name__, self.revision, self.tree, self.host, self.compiler)
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index e79224b..c8d50f4 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -140,6 +140,30 @@ BUILD COMMIT REVISION: myrev
def test_get_latest_revision_none(self):
self.assertRaises(data.NoSuchBuildError, self.x.get_latest_revision, "tdb", "charis", "cc")
+ def test_get_old_revs_none(self):
+ self.assertEquals([],
+ list(self.x.get_old_revs(u"tdb", u"charis", u"gcc")))
+
+ def test_get_old_revs(self):
+ path = self.create_mock_logfile("tdb", "charis", "cc",
+ contents="""
+BUILD COMMIT REVISION: 12
+""")
+ build = data.Build(path[:-4], "tdb", "charis", "cc")
+ b1 = self.x.upload_build(build)
+ path = self.create_mock_logfile("tdb", "charis", "cc",
+ contents="""
+BUILD COMMIT REVISION: 15
+""")
+ build = data.Build(path[:-4], "tdb", "charis", "cc")
+ b2 = self.x.upload_build(build)
+ path = self.create_mock_logfile("tdb", "charis", "cc",
+ contents="""
+BUILD COMMIT REVISION: 15
+""")
+ self.assertEquals([b1, b2],
+ list(self.x.get_old_revs(u"tdb", u"charis", u"cc")))
+
class BuildResultStoreTests(BuildFarmTestCase,BuildResultStoreTestBase):
diff --git a/buildfarm/tests/test_hostdb.py b/buildfarm/tests/test_hostdb.py
index f50c568..ca406f4 100644
--- a/buildfarm/tests/test_hostdb.py
+++ b/buildfarm/tests/test_hostdb.py
@@ -41,6 +41,11 @@ class HostDatabaseTests(object):
self.assertEquals(1, len(hosts))
self.assertEquals("charis", hosts[0].name)
+ def test_host(self):
+ newhost = self.db.createhost(u"charis", u"linux", u"Jelmer", u"jelmer at samba.org", u"bla", u"Pemrission?")
+ samehost = self.db.host(u"charis")
+ self.assertEquals(samehost, newhost)
+
def test_create_already_exists(self):
host = self.db.createhost(name=u"foo", owner=u"Jelmer", owner_email=u"jelmer at samba.org")
self.assertRaises(hostdb.HostAlreadyExists, self.db.createhost, name=u"foo",
--
build.samba.org
More information about the samba-cvs
mailing list