[Buildbot-commits] buildbot/buildbot/test test_vc.py,1.26,1.27

Brian Warner warner at users.sourceforge.net
Tue May 3 20:02:07 UTC 2005


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

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

support Baz, revisions for tla+baz, make error steps terminate build

	* buildbot/process/base.py (Build.startBuild): fix a bug that
	caused an exception when the build terminated in the very first
	step.
	(Build.stepDone): let steps return a status of EXCEPTION. This
	terminates the build right away, and sets the build's overall
	status to EXCEPTION too.
	* buildbot/process/step.py (BuildStep.failed): return a status of
	EXCEPTION when that is what has happened.

	* buildbot/process/step.py (Arch.computeSourceRevision): finally
	implement this, allowing Arch-based projects to get precise
	checkouts instead of always using the latest code
	(Bazaar): create variant of Arch to let folks use baz instead of
	tla. Requires a new buildslave too.
	* buildbot/slave/commands.py (Arch): add 'revision' argument
	(Bazaar): create variant of Arch that uses baz instead of tla.
	Remove the code that extracts the archive name from the
	register-archive output, since baz doesn't provide it, and require
	the user provide both the archive name and its location.
	* buildbot/test/test_vc.py (VC.testBazaar): added tests


Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- test_vc.py	26 Apr 2005 09:43:17 -0000	1.26
+++ test_vc.py	3 May 2005 20:02:04 -0000	1.27
@@ -64,13 +64,15 @@
                 # many VC systems can access the repository via HTTP
                 self.Repository_HTTP = "http://localhost:%d"
 
-        self.have = {'arch': False, 'darcs': False,
+        self.have = {'tla': False, 'baz': False, 'darcs': False,
                      'svn': False, 'cvs': False,
                      }
 
         for p in os.environ['PATH'].split(os.pathsep):
             if os.path.exists(os.path.join(p, 'tla')):
-                self.have['arch'] = True
+                self.have['tla'] = True
+            if os.path.exists(os.path.join(p, 'baz')):
+                self.have['baz'] = True
             if os.path.exists(os.path.join(p, 'darcs')):
                 self.have['darcs'] = True
             if os.path.exists(os.path.join(p, 'svn')):
@@ -90,8 +92,10 @@
 
         if not self.have['svn']:
             log.msg("could not find usable 'svn', skipping Subversion tests")
-        if not self.have['arch']:
-            log.msg("could not find 'tla' on $PATH, skipping Arch tests")
+        if not self.have['tla']:
+            log.msg("could not find 'tla' on $PATH, skipping some Arch tests")
+        if not self.have['baz']:
+            log.msg("could not find 'baz' on $PATH, skipping some Arch tests")
         if not self.have['darcs']:
             log.msg("could not find 'darcs' on $PATH, skipping Darcs tests")
         if not self.have['cvs']:
@@ -318,7 +322,7 @@
         if metadir:
             self.loadConfig(config % 'export')
 
-            self.doBuild() #"export rebuild clobbers new files
+            self.doBuild() # export rebuild clobbers new files
             if metadir:
                 self.shouldNotExist(workdir, metadir)
             self.shouldNotExist(workdir, "newfile")
@@ -361,7 +365,7 @@
         # Arch
 
     def testArch(self):
-        if not VCS.have['arch']:
+        if not VCS.have['tla']:
             raise unittest.SkipTest("Arch (tla) is not installed")
         self.do_vc("step.Arch", {
             'url': VCS.RepositoryPath + "/Arch-Repository",
@@ -384,6 +388,17 @@
         # change it from the default, then 'tla update' won't work.
         os.system("tla register-archive -d test at buildbot.sf.net--testvc")
 
+    def testBazaar(self):
+        if not VCS.have['baz']:
+            raise unittest.SkipTest("Arch (baz) is not installed")
+        self.do_vc("step.Bazaar", {
+            'url': VCS.RepositoryPath + "/Arch-Repository",
+            'archive': "test at buildbot.sf.net--testvc",
+            'version': "testvc--mainline--1",
+            },
+                   testRetry=False)
+        os.system("baz register-archive -d test at buildbot.sf.net--testvc")
+
 class VC_HTTP(SetupMixin, unittest.TestCase):
     def serveHTTP(self):
         # launch an HTTP server to serve the repository files
@@ -403,7 +418,7 @@
         # Darcs has a metadir="_darcs", but it does not have an 'export' mode
 
     def testArchHTTP(self):
-        if not VCS.have['arch']:
+        if not VCS.have['tla']:
             raise unittest.SkipTest("Arch (tla) is not installed")
         self.do_vc("step.Arch", {
             'url': VCS.Repository_HTTP % self.httpPort + "/Arch-Repository",
@@ -411,6 +426,16 @@
             }, testRetry=False)
         os.system("tla register-archive -d test at buildbot.sf.net--testvc")
 
+    def testBazaarHTTP(self):
+        if not VCS.have['baz']:
+            raise unittest.SkipTest("Arch (tla) is not installed")
+        self.do_vc("step.Bazaar", {
+            'url': VCS.Repository_HTTP % self.httpPort + "/Arch-Repository",
+            'archive': "test at buildbot.sf.net--testvc",
+            'version': "testvc--mainline--1",
+            }, testRetry=False)
+        os.system("baz register-archive -d test at buildbot.sf.net--testvc")
+
 class Patch(SetupMixin, unittest.TestCase):
     def failUnlessIn(self, substr, string):
         self.failUnless(string.find(substr) != -1)





More information about the Commits mailing list