[Buildbot-commits] buildbot/buildbot/test test_steps.py,1.46,1.47

Brian Warner warner at users.sourceforge.net
Sun Dec 23 08:35:34 UTC 2007


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

Modified Files:
	test_steps.py 
Log Message:
[project @ make TreeSize actually work. Closes #47.]

Original author: warner at lothar.com
Date: 2007-12-23 08:34:26+00:00

Index: test_steps.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- test_steps.py	23 Dec 2007 07:17:01 -0000	1.46
+++ test_steps.py	23 Dec 2007 08:35:31 -0000	1.47
@@ -619,3 +619,23 @@
         cmd.rc = 0
         results = step.evaluateCommand(cmd)
         self.failUnlessEqual(results, WARNINGS)
+
+
+class TreeSize(StepTester, unittest.TestCase):
+    def testTreeSize(self):
+        self.slavebase = "TreeSize.testTreeSize.slave"
+        self.masterbase = "TreeSize.testTreeSize.master"
+
+        sb = self.makeSlaveBuilder()
+        step = self.makeStep(shell.TreeSize)
+        d = self.runStep(step)
+        def _check(results):
+            self.failUnlessEqual(results, SUCCESS)
+            kib = step.getProperty("tree-size-KiB")
+            self.failUnless(isinstance(kib, int))
+            self.failUnless(kib < 100) # should be empty, I get '4'
+            s = step.step_status
+            self.failUnlessEqual(" ".join(s.getText()),
+                                 "treesize %d KiB" % kib)
+        d.addCallback(_check)
+        return d





More information about the Commits mailing list