create-test-environment
author Mike Conley <mike.d.conley@gmail.com>
Mon, 23 Jun 2014 15:46:24 -0700
changeset 358898 a5e8482c4d81318970956c1568bb80006aea9800
parent 358889 fbb4bd1952831fa6fa882c879e6a035fe3ff7c8e
child 358986 824d08326fe7a676947cacefbbf8116d7e1fcee3
permissions -rwxr-xr-x
Adding all of the release boilerplate and LICENSE / AUTHORS.

#!/bin/sh

set -e

if [ ! -d venv ]; then
  virtualenv venv
fi

source venv/bin/activate
pip install --upgrade -r test-requirements.txt

# ReviewBoard doesn't work with pip, sadly.
easy_install ReviewBoard==2.0.2

# rbmozui requires Node.js when installed normally. But in local
# development mode it doesn't. So use local development node.
mkdir -p venv/tmp
if [ -d venv/tmp/rbmozui ]; then
  cd venv/tmp/rbmzui && git pull
else
  git clone git@github.com:mikeconley/rbmozui.git venv/tmp/rbmozui
fi

cd venv/tmp/rbmozui;
python setup.py develop
cd ../../..

cat > venv/bin/sitecustomize.py << EOF
import os

if os.environ.get('CODE_COVERAGE', False):
    import uuid
    import coverage

    covpath = os.path.join(os.environ['COVERAGE_DIR'],
        'coverage.%s' % uuid.uuid1())
    cov = coverage.coverage(data_file=covpath, auto_data=True)
    cov._warn_no_data = False
    cov._warn_unimported_source = False
    cov.start()
EOF