[Buildbot-devel] Testing a client-server system
Axel Hecht
l10n.moz at googlemail.com
Sun Mar 8 13:54:14 UTC 2009
2009/3/8 Brad Hards <bradh at frogmouth.net>
> Hi,
>
> I've set up a buildbot for the OpenChange project
> (http://buildbot.openchange.org).
>
> The basic build and test is all fine. I'm now trying to get a more complex
> test going now, involving client and server tests.
>
> I need to configure the server (working).
>
> I need to start the server (basically working). The server could go into
> the
> background, but I really need to detect when the server is functional (I'm
> hoping to use a LogLineObserver subclass for this).
>
> When the server is up and running, I need to start a few client processes
> and
> check the output. I then need to shut down the server. I was hoping to
> start
> another builder using a Triggerable scheduler, with a "killall"
> ShellCommand
> as the last buildstep to shut the server back down.
>
> The LogLineObserver is basically working (I see the log.msg for "trying to
> trigger clienttest"), but the Trigger doesn't appear to cause the clientest
> scheduler to do anything.
>
> Here is some key parts of the master.cfg setup:
>
> clienttest = Triggerable(name="clienttest",
> builderNames=["clienttest-centos52"])
>
> c['schedulers'] = [quick, full, clienttest]
>
> from buildbot.steps.trigger import Trigger
> clienttest = factory.BuildFactory()
> clienttest.addStep(ShellCommand(command=["/home/buildslave2/openchangeinstall/bin/mapiprofile",
> "--help"]))
> clienttest.addStep(ShellCommand(command=["sudo", "/usr/bin/killall",
> "samba"]))
>
>
Looking at your waterfall, you have a problem I'd expect you to have ;-)
The server step isn't finishing, and thus your test build isn't triggered.
Here's what I'd recommend that you do:
Create a step that starts up the server, and waits for the server to be
actually ready.
within the same build, add a step to run your test.
After the test run, add a step to shut down the server, and then to parse
the server logs after the fact. Do that with alwaysRun on,
http://djmitche.github.com/buildbot/docs/0.7.10/#BuildFactory.
That comes with the benefit that you're guaranteed to run the test on the
same slave as the server (which you need, AFAICT).
Axel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20090308/9803a6b8/attachment.html>
More information about the devel
mailing list