Search code examples
pythonunit-testingopenstackopenstack-novatox

tox errors when running nova openstack unit tests


I am trying to run openstack unit tests, and i'm having trouble with tox
i've been following this 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

and 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']

you can find the log file here
Any one had this before?
thank you.


Solution

  • Building wheels for collected packages: python-pcre
    …
     src/pcremodule.c:32:18: fatal error: pcre.h: No such file or directory
    

    The error is quite obvious: to compile python-pcre you need sources for pcre library. python-pcre is just a Python wrapper for pcre which is written in C.