← Back to team overview

maria-developers team mailing list archive

Re: Adding tests to buildbot

 

Hakan Kuecuekyilmaz <hakan@xxxxxxxxxxxx> writes:

> Kristian,
>
> I have now a rough idea on how to run our make distcheck test.
>
> What I need is a howto about adding tests to buildbot.
>
> In Pushbuild times, BUILD/compile-dist && make dist was run prior
> to all other tests. The machines connected to Pushbuild would pull
> the .tar.gz archive to start their tests. I think, we don't really
> need that, but we need to test make distcheck is working.

Yes, Pushbuild had one job than ran and produced a source .tar.gz from `make
dist`. And this was uploaded to most other build slaves as the basis for their
builds. The good point about this approach is that it tests the actual sources
that we are releasing, and forgettting to add some file to the list of what
goes into the source tarball is a very common mistake. It also allows to test
that the source can be built without having autotools, bison, etc. installed.

The problem with out buildbot setup is that our slaves are too poorly
connected network wise. I fear constantly up- and downloading source tarballs
would overload internet connections. It could work well for machines on the
same LAN as the Buildbot master though.

However, we could do something simpler, something like this:

    BUILD/autorun.sh && make -j4 dist
    find . -maxdepth 1 \( -name 'mysql-*.tar.gz -prune -o -print0) | xargs -0 rm -Rf
    gzip -dc mysql-*.tar.gz | tar xf -
    (cd mysql-* && ./configure <options> && make -j4)
    (cd mysql-*/mysql-test && perl mysql-test-run.pl <options>)

This does not catch if the build process starts depending on autotools or
bison, but otherwise should work ok I think.

A seperate test would be to just run `make distcheck` and check that it does
not fail. This is a somewhat different test, it does not test that the
resulting binary works, but it does do some extra checks (like that
`make clean` works correctly).

So either or both of these would be good to have.

I believe Buildbot also has support for one build producing the source tarball
with `make dist`, and once this is done triggering other builds to run from
this. So if you want to do this it should be possible, but as you say we
probably don't really need that at this point.

As to a howto:

 - Find build slaves to run this on.

 - All of this can be configured just by setting up builders in the Buildbot
   master config file and adding appropriate buildsteps.

 - https://internal.askmonty.org/internal/index.php/BuildbotSetup has
   documentation on the setup and configuration of our Buildbot master.

 - /etc/buildbot/maria-master.cfg on hasky is the master config file, you can
   study it to see how the existing setup works.

 - http://djmitche.github.com/buildbot/docs/0.7.11/ is the Buildbot manual
   with detailed description of how the config file works.

Hopefully that should get you started; feel free to ask any specific questions
that may pop up.

 - Kristian.