how to run unittest for nova on ubuntu12.04?

Asked by Shi Feng Xiao

$ git clone git://github.com/openstack/nova.git
$ cd nova
$ ./run_tests.sh
No virtual environment found...create one? (Y/n) y
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-20814.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/lib/python2.7/dist-packages/

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  http://packages.python.org/distribute/easy_install.html

Please make the appropriate changes for your system and try again.

Command "easy_install virtualenv" failed.

Installing virtualenv via easy_install...

What shoud I do if I want to run unittest for nova? Thanks in advance!

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tiantian Gao (gtt116) said :
#1

I don't know why you can not create the virtualenv.

You can try do this:
$ cd nova
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -r tools/pip-requires
$ pip install -r tools/test-requires
$ ./run_tests.sh

Can you help with this problem?

Provide an answer of your own, or ask Shi Feng Xiao for more information if necessary.

To post a message you must log in.