mozilla/coversheet — pull request #32 by cosmin-malutan (2014-06-26 09:08:30+00:00)
Title: Python script for triggering tps testruns on jenkins jobs. (#17)

This is for issue #17.

What the script does:
* Checks and downloads the build and packaged tests.
* Unzip the packaged tests.
* Call create_venv.py to create an environment and install tps
* Activate the environment
* Import mozinstall, check if build is installer, if so, install it
* Check mobile and debug options and create the command arguments for tps testrun
* Call the testrun

Notes:
I added the username and password as hard coded variables, they will be changed in issue#30
When calling create_venv.py we have to be in the same directory with the script becasue else it wont find the 'config/config.json.in', data_files element declared in setup.py.
I trigger the processes with check_call and catch the exceptions, then if an error occured I return the script with return code 1 so the build will be invalidated.
I made a download method in favor of urllib.urlretrieve because the later doesn't throw or notify if the file doesn't exist but it will download the 404 page for instance.