Buildbot selftest
From The FEniCS project
Contents |
Buildbot for testing your own code
This buildbot is set up so that you can test your code before committing it to the main repository. You need to log in the the main FEniCS server (this requires you to have an account, meaning you need to be a developer). Then you run a script giving your email address and the url of the hg repository you want tested. The buildbots will then start building, and you will be notified by email if any of them fail. You should verify that the buildbots start building after initialization, in case any have gone down.
Do not run the cleanup script while the buildbots are running. This might result in the need for a restart of the buildslaves (by me). Rather, if you want to cancel the building, click on the link named 'Build X' where X is numerical value (probably 0) at the bottom of the column with build steps, and click 'Stop builder' This process will need to be repeated for each buldeslave.
Note on location for repository
Because of security issues, it is not possible for users to start the buildslaves (buildbot processes) on the remote machines building the code. Therefore, these buildslaves are running all the time, waiting for instructions. These processes are started as various users. Hence the slaves cannot check out code using 'ssh', as the username of the user who started the slave will be used. So you need to make you repository accessible from any location, meaning you should use a web server, for instance static-http://home.simula.no/~user/hg/dolfin_test for those located at Simula. Please note that checking out the code can take up to half an hour due to the use of 'static-http'.
Instructions
- Log in to the main server:
ssh user@fenics.org
- Change directory to /home/buildbot/selftest:
cd /home/buildbot/selftest
- Run the startup script with arguments:
python start-dolfin.py <your email address> static-http://your.url/hg/folder
Note the 'static-http'. It is important that you use this, or else hg will look for a Mercurial server. If anyone is currently using the buildbot, or did run the cleanup script, you will be notified. You can check the buildbot site http://fenics.org:8020/ for any recent activity. Note: if the site is down, noone has started the buildbot. If you have problems starting the buildbot, contact me, attaching the error.log file if possible.
- Go to the buildbot site: http://fenics.org:8020/ and verify that the build slaves have started. If they are still marked as offline after half an hour, please contact me so that I can restart them (sometimes it takes a while for the slaves to appear, particularly when running other builds).
- When done, please run the cleanup script, allowing other people to use it:
python stop-dolfin.py
What the buildbot does
The buildbot uses the same procedure for running the buildbot as it does for the main repository, but instead of updating the repository, it is deleted every time, and a new checkout is performed. This is done so that your code does not interfere with code from the previous user. This also removes the need of running 'scons clean', as is done on the main buildbot. The steps are:
- Clone repository
- Run 'scons' with demos enabled and all external packages turned off
- Adding umfpack and trilinos
- Adding gts, mpi, scotch
- Adding petsc
- Adding slepc
- Installing to subdirectory 'local'
- Enable tests
- Run tests
The buildbot site (http://fenics.org:8020/) let's you monitor each step, and any error will be displayed here.
Rerunning the buildbot
The buildbot is configured so that it runs once every 24 hours, starting at the time the buildbot is started. Say you experience a failed build, and correct the code. You can then, instead of stopping and starting the buildbot again, go to the buildbot site, and manually start the builders. At the top of the displayed columns are the names of the builders (linux32, linux_64 and mac_osx). Click on these in turn, and then press the 'Force build' button.
Ilmar Wilbers (ilmarw[at]simula.no)

