Development Environment
The Trade Federation source is stored in git along with the rest of the Android platform, and uses the Android platform build system to create its binary. First and foremost, follow these instructions to set up your machine to be able to compile and run things from the Android tree.
Getting the Source
The TF source lives in the Android codebase, but you need to specify an extra option to get at it. Follow these instructions to download the source, but use the branch tradefed
to actually pull down the Trade Federation source. The actual command you run should look something like
$ repo init -u https://…/manifest -b tradefed
Building
Trade Federation is set up in a lightweight "unbundled" branch that uses slightly different build commands from the platform source. In particular, unbundled branches use the tapas
command to set up the build environment, rather than the lunch
command. So starting from the root directory of the source tree you checked out, try:
$ . build/envsetup.sh
$ tapas tradefed-all
$ m -j8
Note that once the $ . build/envsetup.sh
step is done, the other two commands will run equally well from anywhere in the tree.
Running from Command Line
First and foremost, tradefed requires the adb
utility to be in your current $PATH
.
$ export PATH=$PATH:<path to adb>
Building TF using the steps mentioned above will add the tradefed.sh
launcher script to your path. So to launch the TF console, run
$ tradefed.sh
At this point, your environment is set up for Trade Federation.