Ask Your Question
0

tox errors when running nova scheduling unit tests

asked 2018-02-12 21:31:31 -0500

mheniMerzouki gravatar image

updated 2018-02-13 12:06:01 -0500

Hy, i'm an openstack noob.
I am trying to run openstack unit tests, and i'm having trouble with tox
i've been following a this https://docs.openstack.org/zun/latest/contributor/unit-tests.html (tutorial)
i have started with a brand new Ubuntu16.04 LTS instance which has python 2.7 and python 3.5
i took the exact same instructions as the tutorial, the only difference is that i clone the nova repository instead of zun : git clone https://github.com/openstack/nova
so when i run tox -e py35 -- nova.tests.unit.scheduler.filters.test_compute_filters
i keep getting this error :

ERROR: invocation failed (exit code 1), logfile: /home/mnm13/nova/.tox/py35/log/py35-1.log
ERROR: actionid: py35 
msg: getenv cmdargs: ['/home/mnm13/nova/.tox/py35/bin/pip', 'install', 
    '-chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt',
    '-r/home/mnm13/nova/test-requirements.txt']

Any one had this before?

you can find the logfile https://github.com/MheniMerz/tmp-logfile/blob/master/py35-1.log (here)

thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2018-02-13 10:57:28 -0500

updated 2018-02-13 11:00:21 -0500

That output is telling you that the detailed error can be found in a file named /home/mnm13/nova/.tox/py35/log/py35-1.log and without knowing what's in there it's hard to give you a good answer. My guess, since it's pip installing dependencies into a virtualenv which failed, is that you're probably missing one or more library header dependencies which will need to be installed as system packages before pip will be able to build some of the required sdists. Running this should tell you what specific system packages you're missing for a working nova development environment:

tox -e bindep

Note that this is basically what https://docs.openstack.org/nova/lates... also tells you to do.

edit flag offensive delete link more

Comments

thank you for your reply i have edited the question and added a link to the log-file at the end of the question. apparently the problem was that i didn't have pcre installed.

mheniMerzouki gravatar imagemheniMerzouki ( 2018-02-13 12:08:03 -0500 )edit
0

answered 2018-02-13 12:10:03 -0500

mheniMerzouki gravatar image

the problem was that i didn't have pcre installed which is a requirement for tox to run unit tests.
this solved my problem.

sudo apt-get install libpcre3
sudo apt-get install libpcre3-dev

thank you for your help.

edit flag offensive delete link more

Comments

1

Glad this helped! Also I see that nova's bindep.txt is missing libpcre3-dev (a regression introduced last month when whereto was added to test-requirements.txt to improve docs build validation), so I've proposed https://review.openstack.org/544071 to hopefully get it included.

fungi gravatar imagefungi ( 2018-02-13 14:45:40 -0500 )edit

that would be great. also the tox -e bindep command really helps with the missing packages I've installed all of the missing packages thanks to it. thank you again

mheniMerzouki gravatar imagemheniMerzouki ( 2018-02-13 19:06:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2018-02-12 21:31:31 -0500

Seen: 25 times

Last updated: Feb 13