From MozillaWiki
Jump to: navigation, search

Tegra 250 Android Setup

Notes on how I setup the buildbot environment to enable using the Tegra 250 for Reference and Talos testing.


  • Assumes Buildbot v0.8.+
  • Tegra 250 series board with 2.1 Android or better
  • Linux server to run proxy, buildbot slaves and other tools
  • Linux server to run simple web server to serve Talos and other resources needed

Buildbot Master

The buildbot master was configured to use a "stock" Mozilla-test master

Buildbot Slave server

Because each Tegra can connect to the network using ethernet, that is the primary method of communicating with it. The micro USB is only used to install new versions of the SUTAgentAndroid tool and for debugging.

Also because the tests are running on the Tegra, we can run multiple buildbot slaves on a single Linux server.

Slave Server Layout

  • tegras.txt - text file with one entry per line for each active buildslave/tegra pair

Assumes Python 2.6 environment

python [-d|--debug] [-p|--bbpath] [-t|--tegras]
   -d enable debug output
   -p buildslave base directory. defaults to ./
   -t list of Tegra devices to manage. defaults to ./tegras.txt

Testing clientproxy:

  • Setup at least 2 or more tegras
  • Start --echo
    • ensure buildslaves have started for the tegras
  • Edit tegras.txt to comment out one of the tegras
  • Save the file and check, buildslave should be removed for that tegra
  • Edit tegras.txt and re-enable tegra
  • Save the file and check, buildslave should be started
  • Sendchange to start some tests, look to make sure both buildslaves are active
    • during the test run you should see each tegra's output with two reboot notices but only the second one will restart the buildslave. The first one will show "proxy.flg found - looping monitor" in it's output:
INFO    android-tegra01: listening for heartbeat
ERROR   android-tegra01: socket timeout while monitoring
INFO    android-tegra01: hbActive False bbActive True
INFO    android-tegra01: proxy.flg found - looping monitor
INFO    android-tegra01: listening for heartbeat
INFO    android-tegra01: socket data [20090103-06:23:34 trace output]
INFO    android-tegra01: heartbeat detected
    • during a test run, unplug a tegra from the network and make sure the monitor timesout the heartbeat and shuts down the buildslave
    • during a test run, connect with adb shell and kill the sutAgent - make sure monitor notices the socket has died and shuts down the buildslave
  • manually clear the /sdcard/tests dir using adb shell and also use adb uninstall org.mozilla.fennec and then trigger a build to make sure the cleanup and install steps work
    • after the run, cd /data/data/org.mozilla.fennec and ensure that application.ini is the same as the apk that was installed


Sample file


Note: the first field is the directory name, assumes relative to the value specified via the -t option Note: clientproxy monitors the file for changes and will update itself when it does change

test web server

The tests that run on the Tegra for Reference and Talos tests all need to pull data from a webserver. This can be any Nginx/Apache web server with the following files in the root directory.

  • getInfo.html - symlink to talos/getInfo.html
  • startup_test - symlink to talos/startup_test
  • page_load_test - symlink to talos/page_load_test
  • scripts - symlink to talos/scripts
  • talos - symlink to talos/ checkout
  • talos/page_load_test/tp4 - symlink to tp4/ checkout

Currently we use three linux servers running Apache: bm-remote-talos-webhost-{01,02,03}

The process to update them to the current Talos test environment is:

ssh bm-remote-talos-webhost-01
cd /var/www/html/talos
hg pull && hg up -C
cd .. 
rsync -azv --delete . bm-remote-talos-webhost-02:/var/www/html/.
rsync -azv --delete . bm-remote-talos-webhost-03:/var/www/html/.

Aki's changes on foopy

cd /builds
mkdir RCS
sudo yum install rcs
ci -u tegras.txt # check in version 1.1
co -l tegras.txt # check it out for edits
# change tegra-001's IP to
# change tegra-002's IP to
# try telneting to each of those 20701's
ci -u tegras.txt # check in version 1.2
co -l tegras.txt # check it out for edits
# comment out PYTHONPATH from ~/.bash_profile
cd /builds
mkdir buildbot
cd buildbot
hg clone
hg clone
ln -s sut-buildbot-configs configs
ln -s sut-buildbotcustom buildbotcustom
cd buildbotcustom
hg up -r buildbot-0.8.0
cd ..
. /tools/buildbot-0.8.0/bin/activate
cd configs/mozilla-tests
# edit to change android-tegra pass
# edit to change hostname/port
ln -s
ln -s universal_master_sqlite.cfg master.cfg
ln -s localconfig
cd ../..
mkdir foopy01
cd foopy01
ln -s ../buildbotcustom .
for i in master.cfg; do
  ln -s ../configs/mozilla-tests/$i .

packages installed on foopy


yum install libyaml-devel

buildbot 080 virtualenv

cd /tools/buildbot-0.8.0
. bin/activate
easy_install argparse
easy_install pycrypto
easy_install pyasn1
easy_install pyyaml