def __init__(self, source, config, sphinx_conf): super().__init__([source]) # create _static dir self.addStep(ShellCommand(command=["mkdir", "./cases/_static"])) # lint rst self.addStep(StringDownload(sphinx_conf, workerdest="./cases/conf.py")) self.addStep( Sphinx( sphinx_builddir="build", sphinx_sourcedir="cases", strict_warnings=True, ))
def __init__(self, source, config): super().__init__([source]) # create local tfvars config self.addStep(StringDownload(config, workerdest="terraform.tfvars")) # autoreconf reconf = ["autoreconf", "-si"] self.addStep(ShellCommand(name="autoreconf", command=reconf)) # ./configure configure = "./configure" self.addStep(Configure(command=configure)) # make init init = ["make", "init"] self.addStep(ShellCommand(name="init", command=init)) # make check -s self.addStep(GnuAutotestTest())
def testBasic(self): s = StringDownload("Hello World", "hello.txt") s.build = Mock() s.build.getProperties.return_value = Properties() s.build.getSlaveCommandVersion.return_value = 1 s.step_status = Mock() s.buildslave = Mock() s.remote = Mock() s.start() for c in s.remote.method_calls: name, command, args = c commandName = command[3] kwargs = command[-1] if commandName == 'downloadFile': self.assertEquals(kwargs['slavedest'], 'hello.txt') reader = kwargs['reader'] data = reader.remote_read(100) self.assertEquals(data, "Hello World") break else: self.assert_(False, "No downloadFile command found")