예제 #1
0
    def test_description(self):
        s = makeBuildStep("runs.test_steps.Steps.test_description.1",
                          step_class=shell.ShellCommand,
                          workdir="dummy",
                          description=["list", "of", "strings"],
                          descriptionDone=["another", "list"])
        self.failUnlessEqual(s.description, ["list", "of", "strings"])
        self.failUnlessEqual(s.descriptionDone, ["another", "list"])

        s = makeBuildStep("runs.test_steps.Steps.test_description.2",
                          step_class=shell.ShellCommand,
                          workdir="dummy",
                          description="single string",
                          descriptionDone="another string")
        self.failUnlessEqual(s.description, ["single string"])
        self.failUnlessEqual(s.descriptionDone, ["another string"])
예제 #2
0
파일: test_steps.py 프로젝트: Pike/buildbot
    def test_description(self):
        s = makeBuildStep("runs.test_steps.Steps.test_description.1",
                          step_class=shell.ShellCommand,
                          workdir="dummy",
                          description=["list", "of", "strings"],
                          descriptionDone=["another", "list"])
        self.failUnlessEqual(s.description, ["list", "of", "strings"])
        self.failUnlessEqual(s.descriptionDone, ["another", "list"])

        s = makeBuildStep("runs.test_steps.Steps.test_description.2",
                          step_class=shell.ShellCommand,
                          workdir="dummy",
                          description="single string",
                          descriptionDone="another string")
        self.failUnlessEqual(s.description, ["single string"])
        self.failUnlessEqual(s.descriptionDone, ["another string"])
예제 #3
0
 def test_addHTMLLog(self):
     s = makeBuildStep("runs.test_steps.Steps.test_addHTMLLog")
     s.addHTMLLog("newlog", "some html here")
     bs = s.step_status
     logs = bs.getLogs()
     self.failUnlessEqual(len(logs), 1)
     l1 = logs[0]
     self.failUnless(isinstance(l1, builder.HTMLLogFile))
     self.failUnlessEqual(l1.getText(), "some html here")
예제 #4
0
파일: test_steps.py 프로젝트: Pike/buildbot
 def test_addHTMLLog(self):
     s = makeBuildStep("runs.test_steps.Steps.test_addHTMLLog")
     s.addHTMLLog("newlog", "some html here")
     bs = s.step_status
     logs = bs.getLogs()
     self.failUnlessEqual(len(logs), 1)
     l1 = logs[0]
     self.failUnless(isinstance(l1, builder.HTMLLogFile))
     self.failUnlessEqual(l1.getText(), "some html here")
예제 #5
0
 def test_addCompleteLog(self):
     s = makeBuildStep("runs.test_steps.Steps.test_addCompleteLog")
     s.addCompleteLog("newlog", "some stdout here")
     bs = s.step_status
     logs = bs.getLogs()
     self.failUnlessEqual(len(logs), 1)
     l1 = logs[0]
     self.failUnlessEqual(l1.getText(), "some stdout here")
     l1a = s.getLog("newlog")
     self.failUnlessEqual(l1a.getText(), "some stdout here")
예제 #6
0
파일: test_steps.py 프로젝트: Pike/buildbot
 def test_addCompleteLog(self):
     s = makeBuildStep("runs.test_steps.Steps.test_addCompleteLog")
     s.addCompleteLog("newlog", "some stdout here")
     bs = s.step_status
     logs = bs.getLogs()
     self.failUnlessEqual(len(logs), 1)
     l1 = logs[0]
     self.failUnlessEqual(l1.getText(), "some stdout here")
     l1a = s.getLog("newlog")
     self.failUnlessEqual(l1a.getText(), "some stdout here")
예제 #7
0
파일: test_steps.py 프로젝트: Pike/buildbot
 def test_addURL(self):
     s = makeBuildStep("runs.test_steps.Steps.test_addURL")
     s.addURL("coverage", "http://coverage.example.org/target")
     s.addURL("icon", "http://coverage.example.org/icon.png")
     bs = s.step_status
     links = bs.getURLs()
     expected = {"coverage": "http://coverage.example.org/target",
                 "icon": "http://coverage.example.org/icon.png",
                 }
     self.failUnlessEqual(links, expected)
예제 #8
0
 def test_addURL(self):
     s = makeBuildStep("runs.test_steps.Steps.test_addURL")
     s.addURL("coverage", "http://coverage.example.org/target")
     s.addURL("icon", "http://coverage.example.org/icon.png")
     bs = s.step_status
     links = bs.getURLs()
     expected = {
         "coverage": "http://coverage.example.org/target",
         "icon": "http://coverage.example.org/icon.png",
     }
     self.failUnlessEqual(links, expected)
예제 #9
0
    def test_getProperty(self):
        s = makeBuildStep("runs.test_steps.Steps.test_getProperty")
        bs = s.step_status.getBuild()

        s.setProperty("prop1", "value1", "test")
        s.setProperty("prop2", "value2", "test")
        self.failUnlessEqual(s.getProperty("prop1"), "value1")
        self.failUnlessEqual(bs.getProperty("prop1"), "value1")
        self.failUnlessEqual(s.getProperty("prop2"), "value2")
        self.failUnlessEqual(bs.getProperty("prop2"), "value2")
        s.setProperty("prop1", "value1a", "test")
        self.failUnlessEqual(s.getProperty("prop1"), "value1a")
        self.failUnlessEqual(bs.getProperty("prop1"), "value1a")
예제 #10
0
파일: test_steps.py 프로젝트: Pike/buildbot
    def test_getProperty(self):
        s = makeBuildStep("runs.test_steps.Steps.test_getProperty")
        bs = s.step_status.getBuild()

        s.setProperty("prop1", "value1", "test")
        s.setProperty("prop2", "value2", "test")
        self.failUnlessEqual(s.getProperty("prop1"), "value1")
        self.failUnlessEqual(bs.getProperty("prop1"), "value1")
        self.failUnlessEqual(s.getProperty("prop2"), "value2")
        self.failUnlessEqual(bs.getProperty("prop2"), "value2")
        s.setProperty("prop1", "value1a", "test")
        self.failUnlessEqual(s.getProperty("prop1"), "value1a")
        self.failUnlessEqual(bs.getProperty("prop1"), "value1a")
예제 #11
0
    def test_addLogObserver(self):
        s = makeBuildStep("runs.test_steps.Steps.test_addLogObserver")
        o1, o2, o3 = MyObserver(), MyObserver(), MyObserver()

        # add the log before the observer
        l1 = s.addLog("one")
        l1.addStdout("onestuff")
        s.addLogObserver("one", o1)
        self.failUnlessEqual(o1.out, "onestuff")
        l1.addStdout(" morestuff")
        self.failUnlessEqual(o1.out, "onestuff morestuff")

        # add the observer before the log
        s.addLogObserver("two", o2)
        l2 = s.addLog("two")
        l2.addStdout("twostuff")
        self.failUnlessEqual(o2.out, "twostuff")
예제 #12
0
파일: test_steps.py 프로젝트: Pike/buildbot
    def test_addLogObserver(self):
        s = makeBuildStep("runs.test_steps.Steps.test_addLogObserver")
        o1,o2,o3 = MyObserver(), MyObserver(), MyObserver()

        # add the log before the observer
        l1 = s.addLog("one")
        l1.addStdout("onestuff")
        s.addLogObserver("one", o1)
        self.failUnlessEqual(o1.out, "onestuff")
        l1.addStdout(" morestuff")
        self.failUnlessEqual(o1.out, "onestuff morestuff")

        # add the observer before the log
        s.addLogObserver("two", o2)
        l2 = s.addLog("two")
        l2.addStdout("twostuff")
        self.failUnlessEqual(o2.out, "twostuff")