[Buildbot-commits] buildbot/buildbot/test test_status.py, 1.38, 1.39

Brian Warner warner at users.sourceforge.net
Sat Apr 14 23:41:03 UTC 2007


Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15280/buildbot/test

Modified Files:
	test_status.py 
Log Message:
[project @ MailNotifier: add the project name to the subject line and message body. Thanks to Benoit Sigoure for the patch.]

Original author: warner at lothar.com
Date: 2007-04-14 02:15:57

Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- test_status.py	11 Dec 2006 09:06:36 -0000	1.38
+++ test_status.py	14 Apr 2007 23:41:01 -0000	1.39
@@ -135,7 +135,11 @@
         return MyBuild(self.builder, number, results)
 
     def failUnlessIn(self, substring, string):
-        self.failUnless(string.find(substring) != -1)
+        self.failUnless(string.find(substring) != -1,
+                        "didn't see '%s' in '%s'" % (substring, string))
+
+    def getProjectName(self):
+        return "PROJECT"
 
     def getBuildbotURL(self):
         return "BUILDBOT_URL"
@@ -162,7 +166,7 @@
         self.failUnlessIn("To: bob at dev.com, recip2 at example.com, "
                           "recip at example.com\n", t)
         self.failUnlessIn("From: buildbot at example.com\n", t)
-        self.failUnlessIn("Subject: buildbot success in builder1\n", t)
+        self.failUnlessIn("Subject: buildbot success in PROJECT on builder1\n", t)
         self.failUnlessIn("Date: ", t)
         self.failUnlessIn("Build succeeded!\n", t)
         self.failUnlessIn("Buildbot URL: BUILDBOT_URL\n", t)
@@ -187,7 +191,7 @@
         self.failUnlessIn("To: recip2 at example.com, "
                           "recip at example.com\n", t)
         self.failUnlessIn("From: buildbot at example.com\n", t)
-        self.failUnlessIn("Subject: buildbot success in builder1\n", t)
+        self.failUnlessIn("Subject: buildbot success in PROJECT on builder1\n", t)
         self.failUnlessIn("Build succeeded!\n", t)
         self.failUnlessIn("Buildbot URL: BUILDBOT_URL\n", t)
 
@@ -288,7 +292,7 @@
         self.failUnlessIn("To: dev3 at dev.com, dev4 at dev.com, "
                           "recip2 at example.com, recip at example.com\n", t)
         self.failUnlessIn("From: buildbot at example.com\n", t)
-        self.failUnlessIn("Subject: buildbot failure in builder1\n", t)
+        self.failUnlessIn("Subject: buildbot failure in PROJECT on builder1\n", t)
         self.failUnlessIn("The Buildbot has detected a new failure", t)
         self.failUnlessIn("BUILD FAILED: snarkleack polarization failed\n", t)
         self.failUnlessEqual(r, ["dev3 at dev.com", "dev4 at dev.com",
@@ -314,7 +318,7 @@
         self.failUnless(len(self.messages) == 1)
         m,r = self.messages.pop()
         t = m.as_string()
-        self.failUnlessIn("Subject: buildbot warnings in builder1\n", t)
+        self.failUnlessIn("Subject: buildbot warnings in PROJECT on builder1\n", t)
         m2 = email.message_from_string(t)
         p = m2.get_payload()
         self.failUnlessEqual(len(p), 3)





More information about the Commits mailing list