From charlesreid1

Revision as of 01:07, 12 May 2011 by Admin (talk | contribs) (Created page with "Buildbot creates a framework for automated code testing. =Installation= Tarballs can be obtained from here: http://trac.buildbot.net/ Download/installation instructions are he...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Buildbot creates a framework for automated code testing.

Installation

Tarballs can be obtained from here: http://trac.buildbot.net/

Download/installation instructions are here: http://trac.buildbot.net/wiki/DownloadInstall

Since I was building Buildbot on a system where I had no administrative permissions, I used virtualenv (see Python#Virtual Python: virtualenv for more information).

I downloaded the tarball, extracted it, then ran:

$ ptyhon setyp.py install --prefix=/path/to/virtualenv

After doing this, I can use the python binary in /path/to/virtualenv/bin/python to load the buildbot library through python.

Once setup.py is finished, I ran:

$ buildbot --version
Buildbot version: 0.8.3p1
Twisted version: 11.0.0

Mock Package

In order to run BuildBot, you will also need the Mock package, which is also related to testing.

Obtain Mock here: http://pypi.python.org/pypi/mock#downloads


Usage

Unit Test Suite

export PYTHONPATH=".:${PYTHONPATH}"; trial buildbot.test
export PYTHONPATH=".:${PYTHONPATH}"; trial buildslave.test

(Note that although you can build Buildbot without Mock, the above test suites will fail without mock.)

For me, the slave test fails with:

$ export PYTHONPATH=".:${PYTHONPATH}"; trial buildslave.test
buildslave
  test ...                                                              [ERROR]

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/home/u0552682/pkg/virtualenv/lib/python2.4/site-packages/Twisted-11.0.0-py2.4-linux-x86_64.egg/twisted/trial/runner.py", line 677, in loadByNames
    things.append(self.findByName(name))
  File "/home/u0552682/pkg/virtualenv/lib/python2.4/site-packages/Twisted-11.0.0-py2.4-linux-x86_64.egg/twisted/trial/runner.py", line 487, in findByName
    return reflect.namedAny(name)
  File "/home/u0552682/pkg/virtualenv/lib/python2.4/site-packages/Twisted-11.0.0-py2.4-linux-x86_64.egg/twisted/python/reflect.py", line 475, in namedAny
    obj = getattr(obj, n)
exceptions.AttributeError: 'module' object has no attribute 'test'

buildslave.test


Creating a Master

$ buildbot create-master experimental_buildmaster