You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Continuous Testing

We're running an experimental [http://buildbot.sourceforge.net/ BuildBot] server; after every check-in to SVN, several BuildBot clients will automatically download the latest code and run "make test". The results [http://buildbot.spamassassin.org:8010/ are visible here].

Notes on Setting Up a BuildBot Slave

We currently have build slaves building

  • trunk using Red Hat 7.3's perl
  • trunk using vanilla perl 5.6.1
  • trunk using vanilla perl 5.8.5 with threading
  • b3.0 using Red Hat 7.3's perl

(among others.)

If you fancy it, and are running an OS different from the above, it might be worthwhile setting up a build slave to extend this... non-linux platforms especially would be great. "make test" needs to be passing on this platform, though, as otherwise we'll be bombarded with "test failure" messages, even if the tree builds on other OSes.

Notes:

For now, only committers' machines will be added to the BuildBot slaves list – we need to be sure that you're contactable, and we're not sure if there's any security issues involved!

There may be a possibility that if someone gets malicious code into SVN trunk at any time, it'll be run on your machine. So if that's worrying, best to avoid setting up a 'bot.

The slave process should be kept up and running as much as possible; it's got to be a persistent daemon.

I'd recommend running as non-root, and not as your own userid. if a miscreant managed to get hostile code into SVN trunk, it'd pretty quickly get run on your machine by this code.

It's not *too* CPU hungry – but will kick off a compile and "make test" *every time* someone checks something into SpamAssassin svn! so if that puts you off, this isn't for you (wink)

so pretty much, overall, this requires that you have root on some box which has a 99%-uptime network connection to set a slave up.

Commands To Set Up a BuildBot Slave

Install Twisted 1.3.0. This step can be omitted if you already have it, or just use "sudo apt-get install twisted" if you're on debian unstable.

Note that you also need python 2.2 or later installed.

wget http://twistedmatrix.com/downloads/Twisted_NoDocs-1.3.0.tar.bz2
bunzip2 -cd < Twisted_NoDocs-1.3.0.tar.bz2 | tar xvf -
cd Twisted-1.3.0 ; sudo python setup.py install
cd ..

Next, install BuildBot itself:

wget http://internap.dl.sourceforge.net/sourceforge/buildbot/buildbot-0.6.1.tar.gz
tar xvfz buildbot-0.6.1.tar.gz
cd buildbot-0.6.1 ; sudo python setup.py install

And create a user account to run the slave as, then set up the slave:

sudo useradd -c "SpamAssassin Buildbot" buildbot
sudo su - buildbot
mkdir -p /home/buildbot/slaves

    [now, you need the buildbot password.  ask on the IRC channel
    and one of the PMC should be able to set you up with one.
    If you're a PMC member, take a look at /home/buildbot/README
    on bugzilla.]

PASSWORD=[password]

    [give your slave a good name, like "jm-debian-stable" or
    "jm-ubuntu-hoary-perl585"]

HOST_OS="username-hostname-osname"

mkdir /home/buildbot/slaves/$HOST_OS
cd /home/buildbot/slaves/$HOST_OS
mktap buildbot slave --basedir /home/buildbot/slaves/$HOST_OS --master \
        buildbot.spamassassin.org:9989 --name $HOST_OS \
        --passwd $PASSWORD --usepty 0 --keepalive 300

(note: use "mktap" directly instead of "buildbot slave so you can set usepty and keepalive.) Mail dev/at/SpamAssassin.apache.org the $HOST_OS string you've chosen.

Command to start the slave process:

buildbot start /home/buildbot/slaves/$HOST_OS

to monitor slave progress/errors:

less /home/buildbot/slaves/$HOST_OS/twistd.log

to start at boot in future, add this line to crontab (on linux machines):

@reboot buildbot start /home/buildbot/slaves/username-hostname-osname
  • No labels