Bug 915938 - Increase fuzz for text-not-in-doc-test.html. r=gw280, a=bustage
[gecko.git] / testing / xpcshell / b2g_xpcshell_venv.sh
blobda8cde448b0936c6b6ab4559d7439dd57857000c
1 #!/bin/bash
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 # You can obtain one at http://mozilla.org/MPL/2.0/.
6 PYTHON=$1
8 if [ -z "${PYTHON}" ]
9 then
10 echo "No python found"
11 exit 1
14 if [ -z "${MARIONETTE_HOME}" ]
15 then
16 echo "No MARIONETTE_HOME found"
17 exit 1
20 if [ -z "${XPCSHELLTEST_HOME}" ]
21 then
22 echo "No XPCSHELLTEST_HOME found"
23 exit 1
26 echo "Detected Marionette home in $MARIONETTE_HOME"
28 # If a GECKO_OBJDIR environemnt variable exists, we will create the Python
29 # virtual envirnoment there. Otherwise we create it in the PWD.
30 VENV_DIR="marionette_venv"
31 if [ -z $GECKO_OBJDIR ]
32 then
33 VENV_DIR="$MARIONETTE_HOME/$VENV_DIR"
34 else
35 VENV_DIR="$GECKO_OBJDIR/$VENV_DIR"
38 # Check if environment exists, if not, create a virtualenv:
39 if [ -d $VENV_DIR ]
40 then
41 echo "Using virtual environment in $VENV_DIR"
42 cd $VENV_DIR
43 . bin/activate
44 else
45 echo "Creating a virtual environment in $VENV_DIR"
46 curl https://raw.github.com/pypa/virtualenv/develop/virtualenv.py | ${PYTHON} - $VENV_DIR
47 cd $VENV_DIR
48 . bin/activate
49 # set up mozbase
50 git clone git://github.com/mozilla/mozbase.git
51 cd mozbase
52 python setup_development.py
55 # update the marionette_client
56 cd $MARIONETTE_HOME
57 python setup.py develop
59 cd $XPCSHELLTEST_HOME
61 # pop off the python parameter
62 shift
63 python runtestsb2g.py $@