mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 797154: A new virtualenv frontend for B2G mochitests. r=jgriffin
This commit is contained in:
parent
efdd777320
commit
e57aecb68c
53
testing/marionette/client/marionette/venv_mochitest.sh
Normal file
53
testing/marionette/client/marionette/venv_mochitest.sh
Normal file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
PYTHON=$1
|
||||
|
||||
if [ -z "${PYTHON}" ]
|
||||
then
|
||||
echo "No python found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine the absolute path of our location.
|
||||
MARIONETTE_HOME=$(cd `dirname $0`/..; pwd)
|
||||
echo "Detected Marionette home in $MARIONETTE_HOME"
|
||||
|
||||
# If a GECKO_OBJDIR environemnt variable exists, we will create the Python
|
||||
# virtual envirnoment there. Otherwise we create it in the PWD.
|
||||
VENV_DIR="mochitest_venv"
|
||||
if [ -z $GECKO_OBJDIR ]
|
||||
then
|
||||
VENV_DIR="$MARIONETTE_HOME/$VENV_DIR"
|
||||
else
|
||||
VENV_DIR="$GECKO_OBJDIR/$VENV_DIR"
|
||||
fi
|
||||
|
||||
# Check if environment exists, if not, create a virtualenv:
|
||||
if [ -d $VENV_DIR ]
|
||||
then
|
||||
echo "Using virtual environment in $VENV_DIR"
|
||||
cd $VENV_DIR
|
||||
. bin/activate
|
||||
else
|
||||
echo "Creating a virtual environment in $VENV_DIR"
|
||||
curl https://raw.github.com/pypa/virtualenv/develop/virtualenv.py | ${PYTHON} - $VENV_DIR
|
||||
cd $VENV_DIR
|
||||
. bin/activate
|
||||
# set up mozbase
|
||||
git clone git://github.com/mozilla/mozbase.git
|
||||
cd mozbase
|
||||
python setup_development.py
|
||||
fi
|
||||
|
||||
# update the marionette_client
|
||||
cd $MARIONETTE_HOME
|
||||
python setup.py develop
|
||||
|
||||
# pop off the python parameter
|
||||
shift
|
||||
|
||||
cd $GECKO_OBJDIR/_tests/testing/mochitest
|
||||
python runtestsb2g.py $@
|
Loading…
Reference in New Issue
Block a user