swift test virtualenv

Asked by Armando Migliaccio

Does swift use virtualenv for unit tests?

I tried

python2.6 setup.py --help-commands

but I couldn't see any option for that.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Armando Migliaccio
Solved:
Last query:
Last reply:
Revision history for this message
clayg (clay-gerrard) said :
#1

you can run swift unittests in a virtualenv, but it's not required. There's no utilities in the swift source tree specifically to help with setting up a virtualenv, but it should be straight-forward:

virtualenv swift
cd swift
. bin/activate

Here's most of my pip freeze if you want a requirements file:

echo "PasteDeploy==1.3.4
WebOb==1.0.1
coverage==3.4
eventlet==0.9.13
greenlet==0.3.1
netifaces==0.5
nose==1.0.0
pep8==0.6.1
simplejson==2.1.2
xattr==0.6.1" > requires.txt

pip install -r requires.txt

bzr branch lp:swift
cd swift
python setup.py develop
./.unittests

Let me know if there was something else you had in mind?

Revision history for this message
Armando Migliaccio (armando-migliaccio) said :
#2

Hi Clay,

thanks, that'll do it :)

I was asking because I am familiar with the way nova unit tests run.

Nova trunk has a run_test.sh script that lets you run tests in a virtual environment, and I wondered if there was a similar mechanism for swift (I think this is also how nova unit-tests are run in Hudson).

Cheers,
Armando