[Buildbot-commits] buildbot/buildbot/test test_web.py,1.7,1.8

Brian Warner warner at users.sourceforge.net
Wed Apr 20 20:13:28 UTC 2005


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

Modified Files:
	test_web.py 
Log Message:
* buildbot/slave/commands.py (ShellCommand.__init__): use os.pathsep

* buildbot/test/test_web.py (WebTest.test_webPortnum): add timeout
(WebTest.test_webPathname): same
(WebTest.test_webPathname_port): same
(WebTest.test_waterfall): use the default favicon rather than rooting around
the filesystem for it. Open the expected-icon file in binary mode, to make
win32 tests happier (thanks to Nick Trout for the catch)
* buildbot/status/html.py (buildbot_icon): win32 portability


Index: test_web.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- test_web.py	19 Apr 2005 08:22:43 -0000	1.7
+++ test_web.py	20 Apr 2005 20:13:26 -0000	1.8
@@ -98,7 +98,7 @@
         port = list(self.find_waterfall(m)[0])[0]._port.getHost().port
 
         d = client.getPage("http://localhost:%d/" % port)
-        page = dr(d)
+        page = dr(d, 10)
         #print page
         self.failUnless(page)
         dr(m.stopService())
@@ -124,7 +124,7 @@
         p = DistribUNIX("test_web2/.web-pb")
 
         d = client.getPage("http://localhost:%d/remote/" % p.portnum)
-        page = dr(d)
+        page = dr(d, 10)
         #print page
         self.failUnless(page)
         dr(p.shutdown())
@@ -151,7 +151,7 @@
         p = DistribTCP(dport)
 
         d = client.getPage("http://localhost:%d/remote/" % p.portnum)
-        page = dr(d)
+        page = dr(d, 10)
         #print page
         self.failUnless(page)
         dr(p.shutdown())
@@ -166,17 +166,11 @@
     'sources': [],
     'builders': [],
     'slavePortnum': 0,
-    'status': [html.Waterfall(http_port=0, favicon='%s')],
+    'status': [html.Waterfall(http_port=0)],
     }
 """
-        favicon = util.sibpath(__file__, "../buildbot.png")
-        #print favicon
-        cfg = config1 % os.path.abspath(favicon)
-        #print "config file is"
-        #print cfg
-        
         os.mkdir("test_web4")
-        m = ConfiguredMaster("test_web4", cfg)
+        m = ConfiguredMaster("test_web4", config1)
         m.startService()
         # hack to find out what randomly-assigned port it is listening on
         port = list(self.find_waterfall(m)[0])[0]._port.getHost().port
@@ -189,7 +183,7 @@
 
         d = client.getPage("http://localhost:%d/favicon.ico" % port)
         icon = dr(d)
-        expected = open(favicon,"r").read()
+        expected = open(html.buildbot_icon,"rb").read()
         self.failUnless(icon == expected)
 
         dr(m.stopService())





More information about the Commits mailing list