Tuesday, February 05, 2008

armenzg: Sess12: Automated tests running and getting results

As you know from last post I have set up buildbot on my laptop to build Firefox and run automated tests every 50 mins.
I started to build properly around midnight when BUILD #5 started which was completed successfully.

Let me talk about the results of BUILD #6(which has already build once on BUILD#5), #7 & #8:

BUILD #6
BUILD #7
BUILD #9
checkout and compile2-3 mins2-3 mins2-3 mins
MAKE CHECK1hr 8mins1hr 20mins42 mins
REFTEST10mins20mins20mins
CRASHTEST4mins1min1min
MOCHITEST22mins31mins30mins
MOCHICHROME6mins11mins12mins
BROWSER CHROME2mins2mins2mins
TOTAL
~2hr05mins
~2hr28mins
~1hr50mins

I have marked in red those values that are over 20mins
We can easily notice that testing takes A LOT OF TIME:
  • Estimated time for all 6 tests: 2 hours
  • DEP BUILD takes 2-3mins
  • a CLEAN CHECKOUT & CLEAN BUILD takes 41mins (value comes from BUILD# 5)

COMMENTS

  • The buildbot's waterfall view is really interesting and allows you to view how the build is going, but the summaries of the tests are really poor and were meant to output on Tinderbox, therefore the "
    " that are shown when looking the summaries of the tests

PROBLEMS

  • I had FF2 open to see the results of the build and when it reached the mochitests it required to open FF3, therefore, there was an alert saying that Firefox was open bla bla bla.
  • At that point, I thought that it waits for me to press "OK" and then run the test but if so, how did I got the results during of builds 6, 7 & 8 if I was sleeping?
  • I remember that during the night time I woke up and I had to select "OK" and it seems that only after that it run
  • I have tried to modify the "perl runtest.pl" step that runs the mochitest by adding "--setenv=MOZ_NO_REMOTE=1" or "--appname='../../../bin/dist/firefox --no-remote" but this did not make any change (BTW I restarted to be able to do apply the changes) and I have also tried to run it manually and I would still get that alert that would wait for a user "OK"

QUESTIONS

  • shall I try to set up a "try server" style set up on my computer? Adam suggested not too, because he will take care of doing it for the Hera cluster
  • would it be interesting to run tests in parallel? Let see what the timings are in the Hera cluster, I bet is better than in my laptop. I believe it could be done if a slave would pass to other computers the BUILD OBJDIR over the net and give them the steps to run the MAKE CHECK (which takes the longest out of all tests) and get the results back
  • which others things shall I add to my steps? Bonsai-poller? Allow clobbering?
  • we should set up a way for the developer to get in their inbox the results of the build/test

In this week's iteration I do the same but with Cairo and see what Adam does with the Hera cluster and try to put my stuff there

Friday, February 01, 2008

armenzg: Sess11: How to set up Buildbot to build Firefox and run automated tests

I have modified the master.cfg file to be able to schedule build with unit tests every 50 minutes on my laptop.
I have reused this file http://lxr.mozilla.org/mozilla/source/tools/buildbot-configs/testing/unittest/master.cfg
and the modified files are posted here:

NOTE: I already have Buildbot set up from last blog post
  • I checked out the buildbot-config for unit test firefox with places (which I am not going to use)
    cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/tools/buildbot-configs/testing/unittest/
  • I moved the checked out files to my ~/BuildbotMaster folder
  • Made all needed changes to set up only one buildslave - These are the main configuration
    c['buildbotURL'] = "http://localhost:8010/"
    c['slavePortnum'] = 9989
    c['status'].append(html.Waterfall(http_port=8010, css="/home/armen/BuildbotMaster/waterfall.css"))
    c['bots'] = [("slave1", "slavepassword1")]
    c['schedulers'].append(Periodic(name="50 minutes build scheduler",
    builderNames=["Linux Ubuntu7.1 dep unit test"],
    periodicBuildTimer=50*60))
    firefox_trunk_ubuntu_builder = {
    'name': "Linux Ubuntu7.1 dep unit test",
    'slavenames': ['slave1'],
    'builddir': "trunk_ubuntu",
    'factory': ubuntuFactory,
    'category': "Firefox"}
  • I have also set up in the buildbot master folder a mozconfig-armen file that create a non-static build and enables tests. This mozconfig-armen gets downloaded by the slave
  • buildbot start ~/BuildbotMaster
  • buildbot start ~/Buildslave
  • I open http://localhost:8010 and I can see the results on it
THE PROBLEM
The problem was that it would never pass the step "client.mk update stdio", because it required human intervention asking to say "yes" or "no" about accepting certain key identifying the server (or something like that)
If I did this step manually would be:
  • cvs -d :ext:unittest@cvs.mozilla.org:/cvsroot co mozilla/client.mk
    which got me this message: "Permission denied (publickey,gssapi-with-mic)"
Therefore, I decided to use this command instead:
  • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co
And I updated the master.cfg accordingly by changing it to:
  • CVSROOT = ":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
I restarted then the master by doing this:
  • builbot restart ~/BuildbotMaster
Now all that is left is to leave the computer work on it and give me results tomorrow when I wake up.


Image 1. Before fixing CVSROOT
Image 2. After fixing CVSROOT

armenzg: Sess10 - Buildbot initial set up

NOTE: I am setting up the Buildmaster and the buildslave in the same machine
NOTE2: I am going to use the default master.cfg
  • sudo apt-get install buildbot
  • buildbot create-master ~/BuildbotMaster
  • These are the values that I have modified in the master.cfg file and/or are relevant to create a buildslave:
    c['bots'] = [("slave1", "slavepassword1")
    c['slavePortnum'] = 9989
  • To create the slave we have to follow this format:
    buildbot create-slave BASEDIR MASTERHOST:PORT SLAVENAME PASSWORD
  • buildbot create-slave ~/Buildslaves localhost:9989 slave1 slavepassword1
    Creating info/admin, you need to edit it appropriately
    Creating info/host, you need to edit it appropriately
    Please edit the files in /home/armen/Buildslaves/info appropriately.
    //You just have to update your name and email address
  • buildbot start ~/BuildbotMaster
    The buildmaster appears to have (re)started correctly.
  • buildbot start ~/Buildslaves/
    The buildslave appears to have (re)started correctly.
After this I can see the buildbot status on http://localhost:8010 and I can try to force a build and ping my buildslave but unfortunately I can not make anything happen but I get "pending builds". It could be that I did not set up a branch name since I left it as NONE

Later on, I will try to have a more complexed master.cfg, maybe a "try server" set up.
Meanwhile, have a look at the screen shot of my attempt