Failed to execute run_tests.sh

Asked by Feilong Wang

When execute <nova>/run_tests.sh on Ubuntu 12.10 64bit, I got bolew error:

stacker@stacker-ThinkPad-X230:~/workspace_community/nova$ ./run_tests.sh -N
Running ` python setup.py testr --slowest --testr-args='--subunit '`
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'testr'

----------------------------------------------------------------------
Ran 0 tests in 0.214s

OK
cp: cannot stat `.testrepository/-1': No such file or directory

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #1152476.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) said :
#1

flwang,

please try to remove directories named .venv .tox .testrepository and try again?

-- dims

Revision history for this message
Andrew Laski (alaski) said :
#2

By running ./run_tests.sh with the -N you're asking it to not run in a virtual environment, and that appears to bypass its installation of required libraries. If you're fine running in a virtual environment just drop the -N, or you can install the dependencies needed by running 'pip install -r tools/pip-requires' and 'pip install -r tools/test-requires'. That will install testrepository which is where the testr command comes from.

Revision history for this message
lizheming (lizheming-li) said :
#3

you can running 'pip install -r requirements.txt' and 'pip install -r test-requirements.txt' first, and then running './run_test -N' is OK

Can you help with this problem?

Provide an answer of your own, or ask Feilong Wang for more information if necessary.

To post a message you must log in.