= !WebKit !BuildBot = The [http://build.webkit.org WebKit BuildBot] is a system to help automate the compile/test cycle. After every commit to WebKit's Subversion repository it will schedule compilation and tests on a variety of different computers, known as build slaves. == Running a Build Slave == Each build slave needs a unique username and password to be able to take part in the compile/test cycle. Please email [mailto:webkit-dev@lists.webkit.org webkit-dev] if you would like to contribute a build slave. Please ensure that you are familiar with [http://webkit.org/building/build.html building WebKit] from source so that problems getting the slave up and running can be easily troubleshooted. The machine will need to have: === General requirements === 1. Subversion installed and accessible on the `PATH`. 1. Set the computer to not go to sleep (under Energy Saver in System Preferences) 1. Install !BuildBot 1. In a shell, `sudo easy_install buildbot-slave` (sudo easy_install-2.6 buildbot-slave on Snow Leopard) ==== Mac requirements ==== 1. Everything in http://webkit.org/building/tools.html ==== Cygwin Win requirements ==== 1. Everything in http://webkit.org/building/tools.html (if creating a builder, use DirectX SDK December 2004, NOT the FEB 2010 version) 1. For the cygwin install, the actual minimal requirements are: apache, bc, bison, curl, diffutils, flex, gcc, gperf, make, patch, perl, python, readline, ruby, subversion, unzip, zip. 1. From the instructions, save the file WebKitSupportLibrary.zip in a directory (e.g. `c:\deps`) and `set WEBKITSUPPORTLIBRARIESZIPDIR=c:\deps` 1. [http://apple.com/safari/download Safari 4 and QuickTime] 1. [http://java.com/download Java] 1. Set the following registry key: {{{ [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug] "Auto"="0" }}} 1. Under 64-bit versions of Windows, also set the following registry key: {{{ [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug] "Auto"="0" }}} 1. Disable the error reporting UI (i.e., the dialog that says "[program name].exe has stopped working" with options to debug or close the application): 1. Set the following registry key: {{{ [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Windows Error Reporting] "Dont Show UI"="1" }}} 1. Under 64-bit versions of Windows, also set the following registry key: {{{ [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting] "Dont Show UI"="1" }}} 1. Modify the group policy to block the UI: 1. Run the gpedit application (C:\Windows\System\gpedit.msc). 1. Select the "Computer Configuration\Administrative Templates\All Settings" node. 1. Edit the "Prevent display of the user interface for critical errors" item. 1. Enable the setting, then press OK. ==== Non-cygwin Win Requirements ==== 1. Install [http://strawberryperl.com/ Strawberry Perl]. Make sure to run `perl` from the command line at least once. This will set up the library variables. 1. Install [http://python.org/download/ Python] 1. Add Python directory on the system {{{PATH}}} variable (Control Panel -> System -> Advanced - > Environment Variables) 1. Add {{{.PY}}} to the system {{{PATHEXT}}} variable. 1. Download [http://sourceforge.net/projects/pywin32/ pywin32], unzip it and run `setup install` in the unzipped folder. 1. Install [http://pypi.python.org/packages/2.6/s/setuptools/ setuptools]. If the installer fails due to not being able to find a registory entry, see http://selfsolved.com/problems/setuptools-06c11-fails-to-instal. 1. Run `easy_install twisted`. 1. Download [http://code.google.com/p/buildbot/ buildbot-slave zip file], unzip it and run `setup install` in the unzipped folder. 1. Install [http://rubyinstaller.org/ Ruby]. ==== GTK requirements ==== 1. See BuildingGtk 1. Probably need to `sudo apt-get install geoclue libsoup`. (To be verified and moved to BuildingGtk). ==== EFL requirements ==== 1. See [http://trac.webkit.org/wiki/EFLWebKit EFLWebKit] 1. Set ENABLE_DRT=1 in the buildslave's environnment, see [http://trac.webkit.org/wiki/WebKitEFLLayoutTest WebKitEFLLayoutTest] for details. ==== QT requirements ==== 1. See QtWebKit ==== Chromium Requirements ==== 1. See [http://trac.webkit.org/wiki/Chromium Chromium] = Configuring a Build Slave = 1. Open a shell inside a directory suitable to keep the build slaves copy of the !WebKit repository. 1. Run `buildslave create-slave WebKit-BuildSlave build.webkit.org:17000 [username] [password]` 1. Change to the `WebKit-BuildSlave` directory 1. Edit `info/admin` and `info/host` to contain basic contact information and information about the build slave. 1. Edit `buildbot.tac`, changing the umask line to read {{{ umask = 022 }}} 1. Run `buildslave start` to start the build slave. = Troubleshooting = == Perl Error on Windows == On Windows, if you get `perl (...) fatal error - unable to remap (...) to same address as parent`, you need to run {{{ c:\cygwin\bin\ash /bin/rebaseall -b 0x50000000 -o 0x80000 exit }}} or rebase individual files. == Timeouts on GStreamer related tests on Linux == If you're running the buildbot on a headless system, there will be problems with pulseaudio initialization in media tests. To resolve this: 1. Run pulseaudio in system mode by changing {{{PULSEAUDIO_SYSTEM_START}}} from {{{0}}} to {{{1}}} {{{in etc/defaults/pulseaudio}}}. Then (re)start the service {{{service pulseaudio restart}}}. 1. If you're seeing {{{xcb_connection_has_error() returned true}}} in the error output of {{{run-webkit-tests}}} when running media tests, it is likely to be caused by the x11-bell module of pulseaudio. If you don't need it, it's easy to uninstall for example by: {{{apt-get remove --purge pulseaudio-module-x11}}} = Running buildbot master locally = The following instruction describes how to run a buildbot master on Snow Leopard. 1. Install Buildbot 1. sudo easy_install-2.6 buildbot 2. sudo easy_install-2.6 simplejson 2. Add the path to buildbot (e.g. /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/) 3. Add following environment variables (where is the path to a webkit checkout e.g. /Volumes/Data/webkit) * PYTHONPATH=/Tools/Scripts * LC_ALL=en_US.UTF-8 * LANG=en_US.UTF-8 * LC_CTYPE=en_US.UTF-8 4. Creating a master 1. Run {{{buildbot create-master}}} in a new directory 2. Copy stuff from [http://trac.webkit.org/browser/trunk/Tools/BuildSlaveSupport/build.webkit.org-config Tools/BuildSlaveSupport/build.webkit.org-config] and override existing files except buildbot.tac 3. Add passwords.json (all slaves in config.json should have a corresponding entry in password.json 4. Revert [http://trac.webkit.org/changeset/87176/trunk/Tools/BuildSlaveSupport/build.webkit.org-config master.cfg change in r87176] locally 5. Start / Stop buildbots {{{buildbot start}}} or {{{buildbot stop}}} inside the directory you recreated in step 4. 6. Start / Stop build slave 1. Modify slave's buildbot.tac * Set buildmaster_host to 'localhost' or whatever machine you're running master on * Set port to 17000 by default (different from the port master hosts http server) * Set slavename and passwd to one that matches your passwords.js added in 4.2 2. {{{buildslave start}}} as usual.