Buildbot runs unit tests! Yay!

This commit is contained in:
Mitchell Hashimoto 2011-11-12 13:06:37 -08:00
parent ca5618c817
commit 49135dfd24
2 changed files with 31 additions and 2 deletions

View File

@ -17,7 +17,12 @@ def get_builders(slaves):
slaves.
"""
f = BuildFactory()
# TODO
f.addStep(Git(repourl="git://github.com/mitchellh/vagrant.git",
mode="full",
method="fresh",
shallow=True))
f.addStep(buildsteps.Bundler())
f.addStep(buildsteps.UnitTests())
return [BuilderConfig(
name="vagrant-master",

View File

@ -4,4 +4,28 @@ Contains various buildsteps that the build master uses.
import os
# TODO
from buildbot.steps.shell import ShellCommand
class Bundler(ShellCommand):
"""
Runs bundler to get the dependencies for a Ruby project.
"""
name = "bundler"
description = "bundle install"
descriptionDone = "bundler install complete"
command = ["bundle", "install"]
flunkOnFailure = True
haltOnFailure = True
class UnitTests(ShellCommand):
"""
Runs the unit tests via a rake command.
"""
name = "unit tests"
description = "unit tests"
descriptionDone = "passed unit tests"
command = ["rake", "test:unit"]
flunkOnFailure = True
haltOnFailure = True