First, start a one-click loaner and in the shell, select item 2. Then, make a note of the command that runs (you'll need it for a step below). The first time I did this, I did mochitests, and the command line looked like /home/worker/workspace/mozharness/scripts/desktop_unittest.py --config-file /home/worker/workspace/mozharness/configs/unittests/linux_unittest.py --config-file /home/worker/workspace/mozharness/configs/remove_executables.py --no-read-buildbot-config --installer-url=https://queue.taskcluster.net/v1/task/<taskid>/artifacts/public/build/target.tar.bz2 --test-packages-url=https://queue.taskcluster.net/v1/task/<taskid>/artifacts/public/build/target.test_packages.json --mochitest-suite=plain-chunked --e10s --total-chunk=10 --this-chunk=2 --download-symbols=true --no-run-tests
For anything else to work, as root you first need to apt-get install python-virtualenv
Then, login as the regular user (cltbld
is the default name)
- Make a directory for your work:
mkdir $HOME/workspace
(you can choose whatever directory you want here, but make sure to change as appropriate in later steps, as well) cd $HOME/workspace
- Download the mozharness from your try run:
curl -L -o https://queue.taskcluster.net/v1/task/<taskid>/runs/0/artifacts/public/build/mozharness.zip
(replace with the appropriate taskid from the command you copied from your one-click loaner) unzip mozharness.zip && rm mozharness.zip
- Remember that command you copied from your one-click loaner way up at the top of this gist? Run that, make sure you replace all instances of
/home/worker/workspace
with whatever path you created in step 1 above. mkdir $HOME/bin
ln -s $HOME/workspace/build/tests/mach $HOME/bin
export PATH=$PATH:$HOME/bin
ln $HOME/workspace/build/venv/bin/python $HOME/workspace/build/venv/bin/python2.7
source $HOME/workspace/build/venv/bin/activate
- Use
mach
to run your tests! (In the case of my mochitests, it wasmach mochitest --total-chunks=10 --this-chunk=2
)
A couple notes - you don't strictly need to go through steps 6 through 8 above, they just make it easier to run mach
by putting it in your PATH
. You can always type out the full path if you want.