ReferencePlatforms/Test/Mac

From MozillaWiki
Jump to navigation Jump to search

Talos configuration done on qm-pmac04

Important: Do _NOT_ upgrade past 10.4.8. hdiutil has a bug/feature in 10.4.9 and above that prevents Talos Buildbot's from working properly.

OS Setup

  1. Change the resolution
    • System Preferences -> Displays
    • Select 1024x768
  2. Turn off the screen saver
    • System Preferences -> Desktop & Screen Saver
    • Move 'Start screen saver' to 'Never'
  3. Create a 'mozqa' account
niutil -create / /Users/mozqa
niutil -createprop / /Users/mozqa uid 503
niutil -createprop / /Users/mozqa gid 503
niutil -createprop / /Users/mozqa realname "Mozilla QA"
niutil -createprop / /Users/mozqa home "/Users/mozqa"
niutil -createprop / /Users/mozqa shell "/bin/bash"
niutil -createprop / /Users/mozqa passwd "*"
niutil -create / /Groups/mozqa
niutil -createprop / /Groups/mozqa gid 503
passwd mozqa
  1. Enable VNC
    • System Preferences -> Sharing
    • Make sure 'Apple Remote Desktop' is checked.
    • Click 'Access Privileges'
    • Change the VNC password
  2. Install the cltbld ssh key in ~/.ssh

XCode Installation

  1. The next step is to retrieve the Mac reference platform packages from CVS:
export CVS_RSH=ssh
ocvs -d :ext:cltbld@cvs.mozilla.org:/mofo co ref-platforms/mac
  1. Install Xcode
    1. Mount the Xcode dmg
    2. Double click on XcodeTools.mpkg
    3. In the 'Installation Type' section choose 'Customize' and enable everything under 'Cross-Development'

BuildBot Setup

Install Python 2.4.4

  1. Download MacPython 2.4.4
  2. Mount and install MacPython
hdiutil attach python-2.4.4-macosx2006-10-18.dmg
cd /Volumes/Univeral\ MacPython\ 2.4.4
sudo installer -pkg MacPython.mpkg -target /
  1. You must logout and log back in to make sure you are using the new version of Python.

Install Twisted and Zope-Interface

wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-2.4.0.tar.bz2
tar -jvxf Twisted-2.4.0.tar.bz2
cd Twisted-2.4.0
cd ZopeInterface-3.1.0c1
python setup.py build
sudo python setup.py install
cd ../TwistedCore-2.4.0/
python setup.py build
sudo python setup.py install
cd ..
python setup.py build
sudo python setup.py install
cd ..

Install BuildBot

ocvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d buildbot mozilla/tools/buildbot
cd buildbot
python setup.py build
sudo python setup.py install
cd ..
rm -rf buildbot/

Apache Setup

Talos page set and framecycler

cd ~
cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d talos mozilla/testing/performance/talos

You will need to install a page set in ~/talos/page_load_test.
If you are using the new (chrome based) pageloader, do the following:

cd ~/talos/page_load_test
wget http://people.mozilla.com/~bhearsum/QA/Talos/Ref-Platform-Files/tpcomponent.zip
unzip tpcomponent.zip
rm tpcomponent.zip

The rest

Open up /etc/httpd/httpd.conf and change both references of "/Library/WebServer/Documents" to "/Users/mozqa/talos". Restart apache with:

sudo apachectl restart

Talos Setup

Install PyYAML

wget http://pyyaml.org/download/pyyaml/PyYAML-3.05.tar.gz
tar -zvxf PyYAML-3.05.tar.gz
cd PyYAML-3.05
python setup.py build
sudo python setup.py install

Setting up a Talos Buildbot slave

How to setup a Buildbot Talos slave (replace the master.host, username, and password with the correct values)

cd ~
mkdir talos-slave
buildbot create-slave talos-slave master.host:9989 username password

You should then start the slave once to create the proper directory structure.

buildbot start talos-slave
buildbot stop talos-slave

The "build directory" will have been created at this point. Talos needs to be checked out into that directory. Open a command line and cd to it, then run the following command:

cvs -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d talos mozilla/testing/performance/talos

Updating Talos

When you need to update Talos to the latest in cvs you will have to update both the Apache copy and the Buildbot copy. To do this, do the following (replacing $WORKDIR with the right value):

cd ~/talos
cvs up
cd ~/talos-slave/$WORKDIR/talos
cvs up

You do not need to restart Apache or Buildbot after this.