Skip to content

Instantly share code, notes, and snippets.

@nwgh
Last active August 30, 2016 18:18
Show Gist options
  • Save nwgh/af7750a3d3d8e20e16ac896d5de85e4f to your computer and use it in GitHub Desktop.
Save nwgh/af7750a3d3d8e20e16ac896d5de85e4f to your computer and use it in GitHub Desktop.
How to set up your loaner to duplicate a one-click loaner

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)

  1. 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)
  2. cd $HOME/workspace
  3. 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)
  4. unzip mozharness.zip && rm mozharness.zip
  5. 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.
  6. mkdir $HOME/bin
  7. ln -s $HOME/workspace/build/tests/mach $HOME/bin
  8. export PATH=$PATH:$HOME/bin
  9. ln $HOME/workspace/build/venv/bin/python $HOME/workspace/build/venv/bin/python2.7
  10. source $HOME/workspace/build/venv/bin/activate
  11. Use mach to run your tests! (In the case of my mochitests, it was mach 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment