Hi,<div>I'm trying to learn how the testing framework is set up and write my own unit tests for the driver I've been working on.  Unfortunately I'm not making much progress, on my Ubuntu 11.10 system I keep running into problems with M2Crypto.  </div>
<div><br></div><div>I picked up the change to use apt-get instead of pip, but still no luck.  </div><div><br></div><div>During virtualenv setup I recieved an error at install of M2Crypto that the source couldn't be verified, so I ran 'sudo apt-get install -y --force-yes python-m2crypto', deleted the .venv directory and ran run_tests.sh again.</div>
<div><br></div><div>This time the environment setup completed, but again the tests fail for 'ImportError: No module named M2Crypto'.</div><div><br></div><div>Running in the python cli I can do 'import M2Crypto' with no ImportError.  I've spun up a VM for now with 11.04 and things are working, but I would like to understand what's going on with 11.10 and not have to use the VM if I don't have to.  Has anybody seen anything along these lines?  There seems to be quite a bit on Google about 11.10 and M2Crypto, but not finding a resolution.</div>
<div><br></div><div>Thanks,</div><div>John</div><div><br></div><div>``````````````````````````````````````````````````````````````````````````````````````````````````````</div>
<div><br></div><div><div>    Nova development environment setup is complete.</div><div><br></div><div>    Nova development uses virtualenv to track and manage Python dependencies</div><div>    while in development and testing.</div>
<div><br></div><div>    To activate the Nova virtualenv for the extent of your current shell</div><div>    session you can run:</div><div><br></div><div>    $ source .venv/bin/activate</div><div><br></div><div>    Or, if you prefer, you can run commands in the virtualenv on a case by case</div>
<div>    basis by running:</div><div><br></div><div>    $ tools/with_venv.sh <your command></div><div><br></div><div>    Also, make test will automatically use the virtualenv.</div><div>    </div><div>ERROR</div><div>
<br></div><div>======================================================================</div><div>ERROR: <nose.suite.ContextSuite context=nova.tests></div><div>----------------------------------------------------------------------</div>
<div>Traceback (most recent call last):</div><div>  File "/home/jdg/Projects/OpenStack/nova/.venv/local/lib/python2.7/site-packages/nose/suite.py", line 208, in run</div><div>    self.setUp()</div><div>  File "/home/jdg/Projects/OpenStack/nova/.venv/local/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp</div>
<div>    self.setupContext(ancestor)</div><div>  File "/home/jdg/Projects/OpenStack/nova/.venv/local/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext</div><div>    try_run(context, names)</div>
<div>  File "/home/jdg/Projects/OpenStack/nova/.venv/local/lib/python2.7/site-packages/nose/util.py", line 478, in try_run</div><div>    return func()</div><div>  File "/home/jdg/Projects/OpenStack/nova/nova/tests/__init__.py", line 48, in setup</div>
<div>    from nova.tests import fake_flags</div><div>  File "/home/jdg/Projects/OpenStack/nova/nova/tests/fake_flags.py", line 28, in <module></div><div>    flags.DECLARE('auth_driver', 'nova.auth.manager')</div>
<div>  File "/home/jdg/Projects/OpenStack/nova/nova/flags.py", line 224, in DECLARE</div><div>    __import__(module_string, globals(), locals())</div><div>  File "/home/jdg/Projects/OpenStack/nova/nova/auth/manager.py", line 34, in <module></div>
<div>    from nova import crypto</div><div>  File "/home/jdg/Projects/OpenStack/nova/nova/crypto.py", line 36, in <module></div><div>    import M2Crypto</div><div>ImportError: No module named M2Crypto</div>
<div><br></div><div>----------------------------------------------------------------------</div><div>Ran 0 tests in 0.002s</div><div><br></div><div>FAILED (errors=1)</div><div><br></div><div>jdg@grumpy ~/Projects/OpenStack/nova</div>
<div> % cd /tmp</div><div><br></div><div>jdg@grumpy /tmp % python</div><div>Python 2.7.2+ (default, Oct  4 2011, 20:06:09) </div><div>[GCC 4.6.1] on linux2</div><div>Type "help", "copyright", "credits" or "license" for more information.</div>
<div>>>> import M2Crypto</div><div><br></div><div>jdg@grumpy /tmp %                               </div></div>