[Buildbot-devel] darcs patch: add_refresh (and 2 more)

Mark Pauley mpauley at apple.com
Thu Sep 14 22:42:08 UTC 2006


I have just created the patch containing my refresh change and the test.

Here is what darcs send sent to me, I'll make sure to add you all next  
time around.


_Mark

Wed Sep 13 17:11:17 PDT 2006  mpauley at apple.com
   * add_refresh
   Adding a refresh keyword parameter to the Waterfall status object.   
All it does is
   spit out a meta tag when the parameter has been set.  I'll add  
tests next.


Thu Sep 14 11:56:27 PDT 2006  mpauley at apple.com
   * 'waterfall refresh patch 2'

Thu Sep 14 11:58:05 PDT 2006  mpauley at apple.com
   * waterfall refresh test addition

New patches:

[add_refresh
mpauley at apple.com**20060914001117
  Adding a refresh keyword parameter to the Waterfall status object.   
All it does is
  spit out a meta tag when the parameter has been set.  I'll add tests  
next.

] {
hunk ./buildbot/status/html.py 6
+from twisted.python.util import sibpath
hunk ./buildbot/status/html.py 19
-import sys, string, types, time, os.path
+import string, types, time, os.path
hunk ./buildbot/status/html.py 147
+    refresh = None
hunk ./buildbot/status/html.py 167
+        if self.refresh:
+            data += '  <meta http-equiv="refresh" '
+            data += 'content="' + self.refresh + '"/>\n'
hunk ./buildbot/status/html.py 1074
-    def __init__(self, status, changemaster, categories, css=None):
+    def __init__(self, status, changemaster, categories, css=None,
+                 refresh=None):
hunk ./buildbot/status/html.py 1084
+	self.refresh = refresh
hunk ./buildbot/status/html.py 1555
-    def __init__(self, status, control, changemaster, categories, css):
+    def __init__(self, status, control, changemaster, categories, css,
+                 refresh):
hunk ./buildbot/status/html.py 1568
+	self.refresh = refresh
hunk ./buildbot/status/html.py 1570
-                                            categories, css)
+                                            categories, css, refresh)
hunk ./buildbot/status/html.py 1656
-                 robots_txt=None):
+		 refresh=None, robots_txt=None):
hunk ./buildbot/status/html.py 1705
+
+        @type  refresh: string
+        @param refresh: if set, emit a meta refresh tag in the head  
of page
+
hunk ./buildbot/status/html.py 1715
-                           robots.txt::
+                           robots.txt:
hunk ./buildbot/status/html.py 1735
+	self.refresh = refresh
hunk ./buildbot/status/html.py 1761
-                            self.css)
+                            self.css, self.refresh)
}

['waterfall refresh patch 2'
mpauley at apple.com**20060914185627] {
hunk ./buildbot/status/html.py 19
-import string, types, time, os.path
+import string, types, time, sys, os.path
hunk ./buildbot/status/html.py 169
-            data += 'content="' + self.refresh + '"/>\n'
+            data += 'content="%d"/>\n' % self.refresh
}

[waterfall refresh test addition
mpauley at apple.com**20060914185805] {
hunk ./buildbot/test/test_web.py 512
+
+class WaterfallRefresh(BaseWeb, unittest.TestCase):
+    def test_waterfallrefresh(self):
+	os.mkdir("test_waterfallrefresh")
+	self.refresh = 60
+	refresh_config = base_config + """
+c['status'] = [html.Waterfall(http_port=0, refresh=%s)]
+""" % self.refresh
+	
+	self.master = ConfiguredMaster("test_waterfallrefresh",  
refresh_config)
+	self.master.startService()
+	port = list(self.find_waterfall(self.master)[0])[0]._port.getHost 
().port
+	self.port = port
+	#just grab the page and make sure we're good..
+	d = client.getPage("http://localhost:%d/" % port)
+	d.addCallback(self._test_waterfallrefresh_1)
+	return maybeWait(d)
+    test_waterfallrefresh.timeout = 10
+    def _test_waterfallrefresh_1(self, page):
+	self.failUnless(page)
+	self.failUnlessIn("current activity", page)
+	self.failUnlessIn("<html", page)
+	self.failUnlessIn('<meta http-equiv="refresh" '+
+			  'content="%d"/>' % self.refresh, page)
+	
+	d = client.getPage("http://localhost:%d/?phase=0" % self.port)
+	d.addCallback(self._test_waterfallrefresh_2)
+	return d
+    def _test_waterfallrefresh_2(self, page):
+	self.failUnless(page)
+	self.failUnlessIn("<html", page)
+	self.failUnlessIn('<meta http-equiv="refresh" '+
+			  'content="%d"/>' % self.refresh, page)
+	self.master.stopService()
+	os.mkdir("test_waterfallnorefresh")
+	norefresh_config = base_config + """
+c['status'] = [html.Waterfall(http_port=0)]
+"""
+	self.master = ConfiguredMaster("test_waterfallnorefresh",  
norefresh_config)
+	self.master.startService()
+	port = list(self.find_waterfall(self.master)[0])[0]._port.getHost 
().port
+	self.port = port
+	d = client.getPage("http://localhost:%d/" % self.port)
+	d.addCallback(self._testwaterfall_norefresh_1)
+	return maybeWait(d)
+    def _testwaterfall_norefresh_1(self, page):
+	self.failUnless(page)
+	self.failUnlessIn("<html", page)
+	self.failIfIn('<meta http-equiv="refresh"', page)
}

Context:

[move more BuildSteps into buildbot/steps/: step_twisted.py and maxq
warner at lothar.com**20060908204400]
[split user-visible BuildSteps out to separate buildbot/steps/* files
warner at lothar.com**20060908202235]
[remove a lot of unused imports, marked by pyflakes
warner at lothar.com**20060906003506]
[test_locks: make tests compatible with twisted-1.3.0
warner at lothar.com**20060826194905]
[fix typo in MailNotifier docstring
warner at lothar.com**20060825215307]
[make 'stdio' log come first, refactor setupLogfiles
warner at lothar.com**20060825214858]
[locks: can now have multiple simultaneous owners. fixes SF#1434997
warner at lothar.com**20060824100352]
[bump version to 0.7.4+ while between releases
warner at lothar.com**20060823223939]
[releasing buildbot-0.7.4
warner at lothar.com**20060823071032]
[update README and NEWS, add CREDITS
warner at lothar.com**20060823051112]
[stop shipping the PyCon-2003 paper, start shipping .html manual w/ 
images
warner at lothar.com**20060823040108]
[tests: remove test_web.GetURL.testBrokenStuff, it was broken anyway
warner at lothar.com**20060823035743]
[PBChangeSource.prefix= : fix and simplify, just do a string comparison
warner at lothar.com**20060821033638
  This effectively resolves SF#1217699 and SF#1381867
]
[docs/examples/twisted_master.cfg: update from actual installation
warner at lothar.com**20060821033257]
[test_web: oops, fix test case to match actual addURL output
warner at lothar.com**20060821013452]
[docs: update to use f.addStep rather than using s() and the  
constructor list
warner at lothar.com**20060821004156]
[accept either a single string or a list for ShellCommand description=
warner at lothar.com**20060821003800
  This fixes SF#1524659, thanks to Paul Winkler for the catch.

]
[add some contributed Waterfall stylesheets, in contrib/CSS/*.css
warner at lothar.com**20060820224745]
[Start collecting alternative CSS files for the waterfall status page
john at oduinn.com**20060727140956


  From discussions on buildbot mailing lists, a few of us wanted to  
start collecting alternative CSS files. These would be included in  
future buildbot releases, and allow people to easily change from the  
default CSS used by the waterfall status page. This patch includes  
two .css files: one from me, and one from another developer on  
buildbot-dev mailing list. There is no change to the default CSS.

]
[give external BuildStep links a distinct CSS class
warner at lothar.com**20060820223746]
[add BuildStep URLs
warner at lothar.com**20060820222414]
[document LogFiles better
warner at lothar.com**20060814033839]
[docs: fix index tags to avoid confusing texinfo
warner at lothar.com**20060811072910]
[docs: add another index, this one of all master.cfg keys
warner at lothar.com**20060811050429]
[make sure images get built when rendering the manual
warner at lothar.com**20060811044729]
[rename 'buildbot master' to 'buildbot create-master', likewise with  
create-slave
warner at lothar.com**20060811044526]
[reimplement 'useful classes' index with real texinfo indices
warner at lothar.com**20060811035959]
[added docs to Kevin's PYTHONPATH-as-list patch
warner at lothar.com**20060806232910]
[slave.commands.ShellCommand: handle os.pathsep in PYTHONPATH
Kevin Turner <kevin at janrain.com>**20060802025845

  making PYTHONPATH even more of a magic special-case in the environs.
]
[add docs to kevin's test_vc patch, rename helper function
warner at lothar.com**20060806230215]
[test.test_vc.BaseHelper.dovc: let command be a list
Kevin Turner <kevin at janrain.com>**20060801225201]
[LogFileWatcher: survive logfiles which aren't around at startup  
correctly
warner at lothar.com**20060806223459]
[add Manhole .ssh/config suggestion, update NEWS file
warner at lothar.com**20060806211400]
[Trial: fall back to 'cat' if the slave is too old to use logfiles=
warner at lothar.com**20060806200351]
[refactor command-completion handling, warn about old slaves and  
logfiles=
warner at lothar.com**20060806200238]
[add BuildStep.getSlaveName, make useLog more flexible
warner at lothar.com**20060806194026]
[test_steps.py: update to match s/cvs_ver/command_version/ change
warner at lothar.com**20060806070457]
[update commands.py version number
warner at lothar.com**20060806024816]
[docs: add lots of diagrams describing system architecture
warner at lothar.com**20060731082933]
[check for duplicate Scheduler names when loading the config file
warner at lothar.com**20060724220113]
[sample.cfg: simplify the sample BuildFactory
warner at lothar.com**20060721073832]
[docs: add a table of classes that are useful in master.cfg
warner at lothar.com**20060721053134]
[Makefile: add some-apidocs target
warner at lothar.com**20060716033339]
[setup.py: minor comment
warner at lothar.com**20060716033251]
[rearrange sample.cfg into major sections, update manhole example
warner at lothar.com**20060716033100]
[twcompat.py: fix minor typo
warner at lothar.com**20060716005716]
[implement manhole (ssh-based, colorized/line-editing terminal)
warner at lothar.com**20060716005525]
[fix some epydoc issues
warner at lothar.com**20060716000355]
[hush t.p.components.Interface deprecation warnings by using twcompat
warner at lothar.com**20060629174902]
[SVN: add --non-interactive to all spawned commands
warner at lothar.com**20060628200344]
[bot.py: add minor log message
warner at lothar.com**20060628173957]
[scripts.runner: remove obsolete mention of mktap
warner at lothar.com**20060628173739]
[test_steps.py: update to include 'logfiles' argument sent to slave
warner at lothar.com**20060620160753]
[Trial: track Progress from _trial_temp/test.log too
warner at lothar.com**20060620062223]
[step.py: generalize OutputProgressObserver
warner at lothar.com**20060620062111]
[step_twisted.Trial: use logfiles= to get test.log instead of 'cat'
warner at lothar.com**20060620051141]
[LogFileWatcher: oops, make it work from real BuildSteps
warner at lothar.com**20060620050915]
[add support for following multiple LogFiles in a ShellCommand
warner at lothar.com**20060620041718]
[tests: run commands from _trial_temp, not buildbot/test/
warner at lothar.com**20060620035727]
[slave: refactor Command startup/completion a bit
warner at lothar.com**20060620035556]
[add test and docs for the (not-yet implemented) watch-multiple- 
logfiles feature
warner at lothar.com**20060616195742]
[tests: some rmtree refactoring, and create SlaveCommandTestBase
warner at lothar.com**20060616195352]
[test_run.py: factor out rmtree
warner at lothar.com**20060616171011]
[more SignalMixin refactoring
warner at lothar.com**20060616170855]
[move some test utilities like SignalMixin and FakeSlaveBuilder to a  
common file
warner at lothar.com**20060616170356]
[test_vc.P4: rename testBranch to testCheckoutBranch to match others
warner at lothar.com**20060616054020]
[rearrange BuildStatus.addStepWithName a bit
warner at lothar.com**20060616051059]
[new LogObserver test, new setupBuildStepStatus utility method
warner at lothar.com**20060616010650]
[LogObserver: add outReceived and errReceived base methods
warner at lothar.com**20060616010620]
[improve BuildStepStatus creation and setting
warner at lothar.com**20060616010140]
[add user's manual sections on LogObservers, writing status plugins
warner at lothar.com**20060615013052]
[implement TrialTestCaseCounter, a LogObserver that counts test cases  
run
warner at lothar.com**20060615012902]
[update step_twisted to new logs['stdio'] scheme
warner at lothar.com**20060615012611]
[prepare for multiple LogFiles, add LogObservers
warner at lothar.com**20060615012323]
[add ILogFile/ILogObserver
warner at lothar.com**20060615011055]
[move STDOUT/STDERR channel constants to buildbot.interfaces
warner at lothar.com**20060615010518]
[test_p4poller: fix python2.2 compatibility
warner at lothar.com**20060614064751]
[test_vc (P4): skip test properly if p4 is not installed
warner at lothar.com**20060612083413]
[ChangeLog: add entry for Perforce patch
warner at lothar.com**20060612082822]
[test_vc.py (P4): print something useful when we can't start the p4d  
server
warner at lothar.com**20060612081839]
[test_vc.py (P4): avoid use of 'sh -c' by passing '-d' to p4 so it  
won't use PWD
warner at lothar.com**20060612081817]
[test_vc.py: conditionalize some debug prints
warner at lothar.com**20060612081700]
[test_vc (P4): make it work
warner at lothar.com**20060612075018]
[applied patch SF#1473939, initial Perforce support
warner at lothar.com**20060612070100]
[setup.py: add Trove classifiers for PyPI
warner at lothar.com**20060612071801]
[fix an oversight in remote_getCurrentBuilds
warner at lothar.com**20060608213947]
[add a test for the WithProperties/ComparableMixin fix
warner at lothar.com**20060607165017]
[make WithProperties inherit from ComparableMixin, to avoid spurious  
config changes
warner at lothar.com**20060606185846]
[add py2exe support for windows, SF#1401121
warner at lothar.com**20060603201842]
[MailNotifier: don't double-escape the build URL, fixes SF#1452801
warner at lothar.com**20060603182034]
[add bug number to the svn-property-change fix
warner at lothar.com**20060603172839]
[contrib/svn_buildbot.py: handle property changes correctly
warner at lothar.com**20060602155304]
[fix test_web.py to match the title= change
warner at lothar.com**20060602062538]
[add a 'reason' tooltip to the yellow start-of-build box
warner at lothar.com**20060602051445]
[statusgui improvements
warner at lothar.com**20060602032854]
[set ShellCommand.flunkOnFailure=True by default
warner at lothar.com**20060602032323]
[gtkPanes.py: update, show steps and ETAs
warner at lothar.com**20060530070602]
[step_twisted.Trial: set the step name to 'trial', so it shows up  
properly in status displays
warner at lothar.com**20060530070343]
[improve test_properties, mitigate the occasional lockup against  
Twisted-1.3.0
warner at lothar.com**20060529000627]
[update default trialMode to match current Twisted options
warner at lothar.com**20060528220923]
[make the sample Manhole config use a localhost-only port
warner at lothar.com**20060528215911]
[buildbot.texinfo: mention darcs_buildbot.py
warner at lothar.com**20060528181049]
[fix a silly typo
Brian Warner <warner at lothar.com>**20060528145904]
[add a .boringfile
warner at lothar.com**20060528075720]
[stop claiming compatibility with Twisted-1.3.0
warner at lothar.com**20060528075528]
[add a .boringfile
warner at lothar.com**20060528075508]
[add a darcs commit-hook change sender
warner at lothar.com**20060528072700]
[bump versions to 0.7.3+ while between releases
warner at lothar.com**20060528015621]
[TAG buildbot-0.7.3
warner-buildbot at lothar.com**20060523171236]
Patch bundle hash:
bf3a24cd70e259059b7594389df4508de8c69605





More information about the devel mailing list