User:Bear:AndroidTegraNotes
Contents
Tegra 250 Android Setup
Notes on how I setup the buildbot environment to enable using the Tegra 250 for Reference and Talos testing.
Assumptions
- 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
- tegra-???/ -- one each per buildslave
- sut_tools/ -- from HG: build/tools/sut/
- cleanup.py
- reboot.py
- installApp.py
- devicemanager.py
- talos-data/
- talos/ -- hg clone http://hg.mozilla.org/build/talos
- bench@taras.glek/ -- hg clone http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark bench@taras.glek
- pageloader@mozilla.org -- hg clone http://hg.mozilla.org/build/pageloader pageloader@mozilla.org
- clientproxy.py
- tegras.txt - text file with one entry per line for each active buildslave/tegra pair
clientproxy.py
Assumes Python 2.6 environment
python clientproxy.py [-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 clientproxy.py --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
tegras.txt
Sample file
tegra-001 192.168.1.1 tegra-002 192.168.1.2 tegra-042 192.168.1.39
Note: the first field is the directory name, clientproxy.py 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 10.250.49.224 # change tegra-002's IP to 10.250.49.254 # 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 http://hg.mozilla.org/users/asasaki_mozilla.com/sut-buildbotcustom hg clone http://hg.mozilla.org/users/asasaki_mozilla.com/sut-buildbot-configs 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 cp BuildSlaves.py.template BuildSlaves.py # edit to change android-tegra pass cp passwords.py.template passwords.py cp staging_tests_master_stm02_localconfig.py staging_tests_master_foopy01_localconfig.py # edit to change hostname/port ln -s staging_tests_master_foopy01_localconfig.py master_localconfig.py ln -s universal_master_sqlite.cfg master.cfg ln -s staging_config.py localconfig cd ../.. mkdir foopy01 cd foopy01 ln -s ../buildbotcustom . for i in config.py master.cfg master_localconfig.py BuildSlaves.py localconfig.py master_common.py passwords.py; do ln -s ../configs/mozilla-tests/$i . done
packages installed on foopy
OS
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