[Buildbot-commits] buildbot/buildbot/test test_vc.py,1.39,1.40

Brian Warner warner at users.sourceforge.net
Mon Aug 15 18:05:10 UTC 2005


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

Modified Files:
	test_vc.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-287
Creator:  Brian Warner <warner at monolith.lothar.com>

rewrite test_vc, make 'try' work for Darcs

	* buildbot/scripts/tryclient.py (getSourceStamp): extract branches
	where we can (Arch), add a branch= argument to set the branch used
	when we can't
	(BazExtractor): extract the branch too
	(TlaExtractor): same
	* buildbot/scripts/runner.py (TryOptions): add --branch
	* docs/buildbot.texinfo (try): document --branch/try_branch

	* buildbot/slave/commands.py (Darcs): implement get-revision for
	Darcs, so that 'try' will work. This requires the tempfile module
	from python-2.3 .

	* buildbot/test/test_vc.py: rewrite tests, getting better coverage
	of revisions, branches, and 'try' in the process.


Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- test_vc.py	11 Aug 2005 08:22:17 -0000	1.39
+++ test_vc.py	15 Aug 2005 18:05:07 -0000	1.40
@@ -2,7 +2,7 @@
 
 from __future__ import generators
 
-import sys, os, signal, shutil, time
+import sys, os, signal, shutil, time, re
 from email.Utils import mktime_tz, parsedate_tz
 
 from twisted.trial import unittest
@@ -113,167 +113,96 @@
 """
 
[...1891 lines suppressed...]
+        self.vcargs = {'url': url,
+                       'archive': self.archname,
+                       'version': self.defaultbranch,
+                       'retry': (0.5, 3),
+                       }
+        d = self.do_vc_once(False)
+        d.addCallback(self._testRetryFails_1)
+        return maybeWait(d)
+    def _testRetryFails_1(self, bs):
+        self.failUnlessEqual(bs.getResults(), FAILURE)
 
-        # now re-register the original coordinates
-        #w = waitForDeferred(self.registerRepository(self.archcmd,
-        #                                            coordinates))
-        #yield w; w.getResult()
-        #shutil.rmtree(tmp)
-    setup_try = deferredGenerator(setup_try)
     
 
 class Sources(unittest.TestCase):





More information about the Commits mailing list